sdispater / clikit

CliKit is a group of utilities to build beautiful and testable command line interfaces.
MIT License
72 stars 17 forks source link

New exception rendering #19

Closed sdispater closed 4 years ago

sdispater commented 4 years ago

This PR adds a new beautiful exception rendering.

The level of detail regarding the exception will depend on the level of verbosity of the executed command. The stack trace will only be displayed if the command is at least verbose and a more detail stack trace will be displayed if the command is in debug mode.

The stack trace will also be collapsed if there are duplicated frames for instance if the exception is caused by a recursion error.

The chosen colors and styles should work equally well for dark and light console themes.

This new rendering is only available for Python 3.6+.

Here are some examples:

Verbose mode

Screenshot 2020-03-25 at 19 49 43

Debug mode

Screenshot 2020-03-25 at 19 51 08

Collapsed frames

Screenshot 2020-03-25 at 19 58 08