Package liquibase.util
Class ExceptionUtil
java.lang.Object
liquibase.util.ExceptionUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Throwable
findExceptionInCauseChain
(Throwable exceptionToSearchIn, Class<?> desiredCause) Find an exception in the stack of exception causes whose cause matches the desired one.
-
Constructor Details
-
ExceptionUtil
public ExceptionUtil()
-
-
Method Details
-
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
-