Skip to content

exception

HookNotCalledError

Bases: ValueError

Raised when a hook is not called but should have been.

HookNotSetError

Bases: ValueError

Raised when a hook is not set but should have been.

InvalidArgumentError

Bases: ValueError

Raised when a callable receives an invalid argument.

SuperBatchSizeMismatchError

Bases: ValueError

Raised when the super batch is not the expected size.

log_uncaught_exceptions

log_uncaught_exceptions(func: Callable) -> typing.Callable[~ParameterP, ~ReturnT]

Log uncaught exceptions raised by the given function.

Parameters:

Name Type Description Default
func Callable

The function to log unhandled exceptions from.

required

Returns:

Type Description
typing.Callable[~ParameterP, ~ReturnT]

The decorated function if func is not None, otherwise a decorator that can be used to decorate a function.