Package io.fluxcapacitor.common
Interface ErrorHandler<T>
- Type Parameters:
T
- the type of context associated with the error (e.g., the failed task or message)
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Functional interface for handling errors during tasks.
The error handler can log the error or escalate the failure depending on the context.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
handleError
(Throwable e, T context) Handles the givenThrowable
in the context of the provided value.
-
Method Details
-
handleError
Handles the givenThrowable
in the context of the provided value.- Parameters:
e
- the exception that occurredcontext
- the context or input that caused the exception
-