Class ExceptionEvaluator
- java.lang.Object
-
- com.github.advisedtesting.core.internal.ExceptionEvaluator
-
public class ExceptionEvaluator extends Object
-
-
Constructor Summary
Constructors Constructor Description ExceptionEvaluator()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T extends Exception>
TconvertExceptionIfPossible(Throwable thowable, Class<T> exceptionType)Attempts to find and exception of exceptionType, in the causedBy chain of throwable.
-
-
-
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.
-
-