Package com.mackenziehigh.cascade
Interface Cascade.Stage.Actor.ConsumerErrorHandler
- Enclosing interface:
- Cascade.Stage.Actor<I,
O>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Actor Error Handler.
-
Method Summary
Modifier and TypeMethodDescriptionCompose this script and the given script into a single script.void
This method will be invoked by the enclosing actor in order to handle any unhandled exceptions that are thrown by the script.silent()
Compose this script within another script, such that any exceptions thrown by this script will be silently ignored.
-
Method Details
-
onError
This method will be invoked by the enclosing actor in order to handle any unhandled exceptions that are thrown by the script.- Parameters:
cause
- was thrown by the script and unhandled elsewhere.- Throws:
Throwable
- if something goes unexpectedly wrong.
-
silent
Compose this script within another script, such that any exceptions thrown by this script will be silently ignored.- Returns:
- the new script that contains this script.
-
andThen
default Cascade.Stage.Actor.ConsumerErrorHandler andThen(Cascade.Stage.Actor.ConsumerErrorHandler after) Compose this script and the given script into a single script.If either script throws an exception, then the exception will be silently dropped.
- Parameters:
after
- will come after this script inside of the new script.- Returns:
- the new script.
-