Package scriptella.core
Class OnErrorHandler
java.lang.Object
scriptella.core.OnErrorHandler
Error handler for scripting elements.
This class maintains an internal copy of onerrorElements for
ScriptEl to allow calling onError(Throwable) several times
with different return result.
- Version:
- 1.0
- Author:
- Fyodor Kupolov
-
Constructor Summary
ConstructorsConstructorDescriptionOnErrorHandler(ScriptEl scriptEl) Initialize error handler with the list ofOnErrorEl. -
Method Summary
-
Constructor Details
-
OnErrorHandler
Initialize error handler with the list ofOnErrorEl.- Parameters:
scriptEl- scripting element configuration to get onerror info.
-
-
Method Details
-
onError
Called on error to get aOnErrorElwith fallback script.Note: The returned OnErrorEl element is removed from internal list of elements to avoid handling the same error condition twice.
- Parameters:
throwable-- Returns:
- OnErrorEl matching error condition.
-
getErrorCodes
- Parameters:
t- throwables chain.- Returns:
- not null set of found error codes in throwable chain.
-