Helper to raise + chain exceptions (when able) and associate a cause.
NOTE(harlowja): Since in py3.x exceptions can be chained (due to PEP 3134) we should try to raise the desired exception with the given cause (or extract a cause from the current stack if able) so that the exception formats nicely in old and new versions of python. Since py2.x does not support exception chaining (or formatting) our root exception class has a pformat() method that can be used to get similar information instead (and this function makes sure to retain the cause in that case as well so that the pformat() method shows them).
Parameters: |
|
---|
Bases: exceptions.Exception
Base class for most exceptions emitted from this library.
NOTE(harlowja): in later versions of python we can likely remove the need to have a cause here as PY3+ have implemented PEP 3134 which handles chaining in a much more elegant manner.
Parameters: |
|
---|
Bases: taskflow.exceptions.TaskFlowException
Raised when storage backends can not be read/saved/deleted.
Bases: taskflow.exceptions.TaskFlowException
Errors related to conducting activities.
Bases: taskflow.exceptions.TaskFlowException
Errors related to jobs or operations on jobs.
Bases: taskflow.exceptions.JobFailure
Raised when a job can not be claimed.
Bases: taskflow.exceptions.TaskFlowException
Errors related to engine execution.
Bases: taskflow.exceptions.ExecutionFailure
Raised when a worker request was not finished within allotted time.
Bases: taskflow.exceptions.ExecutionFailure
Raised when a invalid state transition is attempted while executing.
Bases: taskflow.exceptions.TaskFlowException
Raised when some type of dependency problem occurs.
Bases: taskflow.exceptions.DependencyFailure
Raised when some type of ambiguous dependency problem occurs.
Bases: taskflow.exceptions.DependencyFailure
Raised when a entity has dependencies that can not be satisfied.
Parameters: |
|
---|
Further arguments are interpreted as for in TaskFlowException.
Exception message template used when creating an actual message.
Bases: taskflow.exceptions.TaskFlowException
Raised when some type of compilation issue is found.
Bases: taskflow.exceptions.TaskFlowException
Raised when some type of version incompatibility is found.
Bases: taskflow.exceptions.TaskFlowException
Raised when a duplicate entry is found.
Bases: taskflow.exceptions.TaskFlowException
Raised when some entry in some object doesn’t exist.
Bases: taskflow.exceptions.TaskFlowException
Raised when some object is empty when it shouldn’t be.
Bases: taskflow.exceptions.TaskFlowException
Raised when some decision can’t be made due to many possible choices.
Bases: taskflow.exceptions.TaskFlowException
Raised when some object/entity is not in the expected format.
Bases: taskflow.exceptions.TaskFlowException
Raised when storage access is not possible due to state limitations.
Bases: exceptions.NotImplementedError
Exception for when some functionality really isn’t implemented.
This is typically useful when the library itself needs to distinguish internal features not being made available from users features not being made available/implemented (and to avoid misinterpreting the two).
Bases: taskflow.utils.mixins.StrMixin, exceptions.Exception
Wraps one or several failure objects.
When exception/s cannot be re-raised (for example, because the value and traceback are lost in serialization) or there are several exceptions active at the same time (due to more than one thread raising exceptions), we will wrap the corresponding failure objects into this exception class and may reraise this exception type to allow users to handle the contained failures/causes as they see fit...
See the failure class documentation for a more comprehensive set of reasons why this object may be reraised instead of the original exception.
Parameters: | causes – the Failure objects that caused this this exception to be raised. |
---|
Check if any of exception classes caused the failure/s.
Parameters: | exc_classes – exception types/exception type names to search for. |
---|
If any of the contained failures were caused by an exception of a given type, the corresponding argument that matched is returned. If not then none is returned.