Class ExceptionEvaluator


  • public class ExceptionEvaluator
    extends Object
    • Constructor Detail

      • ExceptionEvaluator

        public ExceptionEvaluator()
    • Method Detail

      • convertExceptionIfPossible

        public static <T extends Exception> T convertExceptionIfPossible​(Throwable thowable,
                                                                         Class<T> exceptionType)
        Attempts to find and exception of exceptionType, in the causedBy chain of throwable.
        Type Parameters:
        T - an exception type represented by exceptionType parameter.
        Parameters:
        thowable - the throwable to inspect.
        exceptionType - the class of exception we want (including subclass of)
        Returns:
        null if not found, otherwise the found exception.