cpitclaudel / alectryon

A collection of tools for writing technical documents that mix Coq code and prose.
MIT License
228 stars 36 forks source link

Print better tracebacks #38

Closed JasonGross closed 3 years ago

JasonGross commented 3 years ago

This might help with debugging https://github.com/cpitclaudel/alectryon/issues/37

Idk if this is the best way to do this, or if you want it at all, but it seems to work.

cpitclaudel commented 3 years ago

Thanks! Looks good to me; can you show an example of the improved message?

cpitclaudel commented 3 years ago

Oh, fancy, it includes argument values?!

JasonGross commented 3 years ago

Example at https://github.com/cpitclaudel/alectryon/issues/37#issuecomment-823576812, and, yep! It includes argument values. This makes things extremely verbose, though, so it's questionable whether or not you want this enabled by default. (Perhaps even hide it behind --traceback-verbose or something.)

JasonGross commented 3 years ago

But if you think it's not a problem to enable by default, I'd be happy to have this extra information whenever --traceback is enabled.

cpitclaudel commented 3 years ago

Finally merged, thank you. I changed the implementation since catching all exceptions broke PDB