Interface Stage.OnError

  • All Superinterfaces:
    Stage
    Enclosing interface:
    Stage

    public static interface Stage.OnError
    extends Stage
    A stage returning a stream containing all the elements from this stream, additionally performing the provided action if this stream conveys an error.

    The given consumer function must be invoked with the conveyed failure.

    Any RuntimeException thrown by the function must be propagated downstream as an error, replacing the exception that the consumer was handling.

    • Method Detail

      • getConsumer

        java.util.function.Consumer<java.lang.Throwable> getConsumer()
        The error handler.
        Returns:
        the error handler.