libb.print_exception

print_exception(e, short=True)[source]

Print exception traceback with optional verbosity.

Parameters:
  • e (Exception) – The exception to print.

  • short (bool) – If True, prints only traceback above current frame.

Example:

>>> try:
...     raise ValueError("example error")
... except Exception as e:
...     print_exception(e)