Package liquibase.util
Class ExceptionUtil
- java.lang.Object
-
- liquibase.util.ExceptionUtil
-
public class ExceptionUtil extends Object
-
-
Constructor Summary
Constructors Constructor Description ExceptionUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Throwable
findExceptionInCauseChain(Throwable exceptionToSearchIn, Class<?> desiredCause)
Find an exception in the stack of exception causes whose cause matches the desired one.
-
-
-
Method Detail
-
findExceptionInCauseChain
public static Throwable findExceptionInCauseChain(Throwable exceptionToSearchIn, Class<?> desiredCause)
Find an exception in the stack of exception causes whose cause matches the desired one. Note that the exception whose cause matches the desired cause is returned, NOT the cause itself.- Parameters:
exceptionToSearchIn
- the exception to search throughdesiredCause
- the cause that should be found in the stack of causes in the exception to search in- Returns:
- the desired exception, if found, or null otherwise
-
-