Class SQLExceptionUtils

java.lang.Object
com.amazonaws.secretsmanager.util.SQLExceptionUtils

public class SQLExceptionUtils extends Object
SQL Exception Utilities
  • Method Details

    • unwrapAndCheckForCode

      public static boolean unwrapAndCheckForCode(Throwable t, int errorCode)
      Checks the thrown exception and all parent exceptions and returns true if a SQLException with a matching error code is found.
      Parameters:
      t - The SQLException to check
      errorCode - The error code to check for.
      Returns:
      True if the exception or any parent exception is a SQL Exception and getErrorCode matches the error code. Otherwise, false.