Class SQLExceptionUtils
- java.lang.Object
-
- com.amazonaws.secretsmanager.util.SQLExceptionUtils
-
public class SQLExceptionUtils extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanunwrapAndCheckForCode(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.
-
-
-
Method Detail
-
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 checkerrorCode- 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.
-
-