Annotation Interface ErrorHandler


@Target(PARAMETER) @Retention(RUNTIME) public @interface ErrorHandler
Designates a FunctionalInterface annotated-type parameter which will receive an exception thrown from a remote invocation. The targeted parameter may be any functional type which accepts a single argument. The return value, if applicable, is not used. The method must accept a Throwable because remote invocations may have many reasons why they fail beyond the cause of the invocation itself. This can be used with type such as Consumer<Throwable> or Function<Throwable,?>.