PyDocs

Nav

Python Runtime Services

TracebackException.format

  • TracebackException.format(*, chain=True)
Format the exception.

If chain is not *True*, *__cause__* and *__context__* will not be formatted.

The return value is a generator of strings, each ending in a newline and
some containing internal newlines. `print_exception` is a wrapper around
this method which just prints the lines to a file.

The message indicating which exception occurred is always the last
string in the output.
0 Examples
No examples for traceback/TracebackException.format.
See Also
No see-alsos for traceback/TracebackException.format
0 Notes
No notes for TracebackException.format