ID EN
Logging

formatException

Python 3.11

Formats the specified exception information (a standard exception tuple as returned by sys.exc_info()) as a string. This default implementation just uses traceback.print_exception(). The resulting string is returned.

Syntax

PYTHON
formatException(exc_info)

See Also

sys.exc_info() traceback.print_exception()