Class ExceptionUtil

java.lang.Object
liquibase.util.ExceptionUtil

public class ExceptionUtil extends Object
  • 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 through
      desiredCause - 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