Skip to content

gufo.err.failfast.types

TypesFailFast.

TypesFailFast

Bases: BaseFailFast

Fail-fast on the given list of exception types.

Parameters:

Name Type Description Default
types Iterable[Type[Exception]]

Iterable of exception types.

required

Examples:

from gufo.err import err
from gufo.err.types import TypesFailFast

err.setup(fail_fast=[TypesFailFast([RuntimeError, ValueError])])

must_die(t, v, tb)

Check if the process must die quickly.

Returns true if the exception type is one of the given types.