pavilion2 icon indicating copy to clipboard operation
pavilion2 copied to clipboard

Add global --debug option that forces printing full tracebacks.

Open Paul-Ferrell opened this issue 1 year ago • 2 comments

Our succinct errors are nice, except when they're not informative enough to get us to the problem.

Add --debug. It should force the error handling in main.py and errors.pformat() to print full tracebacks.

Also, catching Exception outside of the thread results handling in resolver.py should add an exception layer that says - "Error in thread. Re-run with pav --debug <cmd> to get the full traceback, and file an issue on the pavilion github."

Paul-Ferrell avatar Jan 17 '24 18:01 Paul-Ferrell

Currently main.py catches exceptions and pretty prints them. Add an option to disable that, and print the raw traceback instead.

Also, expand the pretty printing to encapsulate the whole of the main() call.
You'll find that we already do partial argument parsing - you can use that to pull out the '--debug'. (Maybe --show-exceptions)?

Paul-Ferrell avatar Mar 20 '24 20:03 Paul-Ferrell

(Also make sure we're catching KeyboardInterrupt...

Paul-Ferrell avatar Mar 20 '24 20:03 Paul-Ferrell