Interface BeanExceptionHandler<T,​E extends java.lang.Throwable>

  • Type Parameters:
    T - The bean type
    E - And the exception
    All Superinterfaces:
    java.util.function.BiConsumer<T,​E>
    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 BeanExceptionHandler<T,​E extends java.lang.Throwable>
    extends java.util.function.BiConsumer<T,​E>
    An exception handler capable of receiving a bean that originated the exception and an exception type.
    • Method Detail

      • handle

        void handle​(@Nullable
                    T bean,
                    @NonNull
                    E throwable)
        Handles the exception.
        Parameters:
        bean - The bean
        throwable - The error
      • accept

        default void accept​(@Nullable
                            T bean,
                            @NonNull
                            E throwable)
        Handles the exception.
        Specified by:
        accept in interface java.util.function.BiConsumer<T,​E extends java.lang.Throwable>
        Parameters:
        bean - The bean
        throwable - The error