Interface InvocationErrorConsumer

All Known Implementing Classes:
FirstInvocationErrorConsumer
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 interface InvocationErrorConsumer
Behaves similar to Consumer except that it may allow for re-throwing of the underlying Throwable.
  • Method Details

    • accept

      void accept(InvocationError invocationError)
      Accepts the Throwable and processes it. If necessary it can re-throw it, or wrap it in another type and throw that.
      Parameters:
      invocationError - the Throwable instance
    • acceptAndLogError

      default void acceptAndLogError(org.slf4j.Logger logger, InvocationError invocationError)
      Invokes accept(InvocationError), catching any Throwable instances and logging them to the supplied instance of Logger.
      Parameters:
      logger - the logger to accep the Throwable