ID EN
Sys

exc_info

Python 3.11

This function returns the old-style representation of the handled exception. If an exception e is currently handled (so exception() would return e), exc_info() returns the tuple (type(e), e, e.__traceback__). That is, a tuple containing the type of the exception (a subclass of BaseException), the exception itself, and a traceback object which typically encapsulates the call stack at the point where the exception last occurred.

Syntax

PYTHON
sys.exc_info()

See Also

exception() exc_info() BaseException traceback object exc_info()