ID EN
Sys

_current_exceptions

Python 3.11

Return a dictionary mapping each thread’s identifier to the topmost exception currently active in that thread at the time the function is called. If a thread is not currently handling an exception, it is not included in the result dictionary.

Syntax

PYTHON
sys._current_exceptions()

See Also

auditing event