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.

@FunctionalInterface public static interface Cascade.Stage.Actor.ConsumerErrorHandler
Actor Error Handler.
  • Method Details

    • onError

      void onError(Throwable cause) throws Throwable
      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

      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.