Interface TargetExceptionResolver

  • 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 Detail

      • getTargetException

        java.lang.RuntimeException getTargetException​(java.lang.String message,
                                                      java.lang.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 java.lang.RuntimeException getTargetException​(java.lang.Exception source)