- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
ExceptionResolver is a functional interface used to resolve the behavior when an exception occurs during
the processing of a placeholder.
Implementations of this interface define how to handle the exception,
logging the error, rethrowing the exception, or providing a fallback value.
-
Method Summary
Modifier and TypeMethodDescriptionresolve
(Placeholder placeholder, String message, Exception cause) Resolves the behavior in handling exceptions during the processing of a placeholder.
-
Method Details
-
resolve
Resolves the behavior in handling exceptions during the processing of a placeholder. This method is used to determine the appropriate behavior when an exception occurs, such as returning a fallback value, logging the error, or rethrowing the exception.- Parameters:
placeholder
- the placeholder being processed when the exception occurredmessage
- the message providing context or additional information about the exceptioncause
- the exception that occured during the placeholder processing- Returns:
- a string representing the resolved outcome, such as an alternate response or error information.
-