Modifier and Type | Method and Description |
---|---|
void |
resumeError(ExecutionContext context,
Object suspendedState,
Object error)
Resumes this protected resumable in the given execution context
context ,
passing the suspended state suspendedState and an error object error
to it. |
void resumeError(ExecutionContext context, Object suspendedState, Object error) throws ResolvedControlThrowable
context
,
passing the suspended state suspendedState
and an error object error
to it.
This method throws a ResolvedControlThrowable
:
this method is expected to have resolved non-local control changes up to the point
of its invocation.
This method is called by the call executor when resuming a previously suspended
protected function call while unrolling the call stack after an error has occurred.
The error, passed in the error
argument, may be null
.
As with Resumable.resume(ExecutionContext, Object)
, the execution context
context
may differ from the execution context used before, and suspendedState
is guaranteed by the executor to be equivalent to the suspended state registered
by the call to UnresolvedControlThrowable.resolve(Resumable, Object)
. Equivalence here
means that the class will be equal to that of the state object previously registered;
however, the actual instance passed to this method may be a clone or a (serialised
and) de-serialised version of the original object.
Implementations of this method may safely assume that context
is not
null
.
context
- execution context, non-null
when called by a call executorsuspendedState
- suspended state, equivalent to the suspended state registered
with the call executorerror
- error object, may be null
ResolvedControlThrowable
- if the resumed call initiates a non-local control changeCopyright © 2016. All rights reserved.