hooks.exceptions module

Provides exception hooking functionality.

@hooks.exceptions.ExceptHook[source]

Bases: hooks.base._HookDecorator

Fired when an exception is raised.

The decorated function is passed the following parameters whe an exception is raised:

Parameters:
from hooks.exceptions import ExceptHook

@ExceptHook
def exception_callback(exc_type, value, trace_back):
    # Code...

See also

sys.excepthook

hooks.exceptions.except_hooks

The singleton object of the _ExceptHooks class.