twisted.internet.defer.Deferred.errback(self, fail=None)
method documentationtwisted.internet.defer.Deferred
View Source
Run all error callbacks that have been added to this Deferred
.
Each callback will have its result passed as the first argument to the
next; this way, the callbacks act as a 'processing chain'. Also, if the
error-callback returns a non-Failure or doesn't raise an Exception
,
processing will continue on the *success*-callback chain.
If the argument that's passed to me is not a failure.Failure
instance, it will be embedded in one. If no argument is passed, a failure.Failure
instance will be created based on the current traceback stack.
Passing a string as `fail' is deprecated, and will be punished with a warning message.
An instance of Deferred
may
only have either callback
or errback
called on it, and only once.
Parameters | fail | The Failure
object which will be passed to the first errback added to this Deferred (via
addErrback ).
Alternatively, a Exception
instance from which a Failure will be
constructed (with no traceback) or None
to create a Failure
instance from the current exception state (with a traceback). |
Raises | AlreadyCalledError | If callback
or errback
has already been called on this Deferred . |
NoCurrentExceptionError | If fail is None
but there is no current exception state. |