Skip to content

gufo.err.abc.failfast

BaseFailFast.

BaseFailFast

Bases: ABC

Abstract base type for fail-fast behavior.

Fail-fast classes must implement must_die method. When fail-fast check decides the error is unrecoverable, it must return True value.

must_die(t, v, tb) abstractmethod

Fail-fast check. Must be overriden in subclasses.

Parameters:

Name Type Description Default
t Type[BaseException]

Exception type. Same as sys.exc_info()[0].

required
v BaseException

Exception value. Same as sys.exc_info()[1].

required
tb TracebackType

Traceback. Same as sys.exc_info()[2].

required

Returns:

Type Description
bool
  • True, if the error is not recoverable and the process
bool

must be terminated ASAP.

bool
  • False to pass to the next check.