pavilion2
pavilion2 copied to clipboard
Add global --debug option that forces printing full tracebacks.
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."
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)?
(Also make sure we're catching KeyboardInterrupt...