Interface ExceptionResolver

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 ExceptionResolver
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 Type
    Method
    Description
    resolve(Placeholder placeholder, String message, Exception cause)
    Resolves the behavior in handling exceptions during the processing of a placeholder.
  • Method Details

    • resolve

      String resolve(Placeholder placeholder, String message, Exception cause)
      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 occurred
      message - the message providing context or additional information about the exception
      cause - the exception that occured during the placeholder processing
      Returns:
      a string representing the resolved outcome, such as an alternate response or error information.