Interface TargetExceptionResolver

All Known Implementing Classes:
ReflectiveExceptionResolver
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 TargetExceptionResolver
TargetExceptionResolver is responsible for resolving a source exception to a target exception.
  • Method Details

    • getTargetException

      RuntimeException getTargetException(String message, Exception source)
      Translates the passed exception to a RuntimeException. If, for some reason, no target exception can be returned, a TranslationException should be thrown.
      Parameters:
      message -
      source -
      Returns:
      a RuntimeException, never null
    • getTargetException

      default RuntimeException getTargetException(Exception source)