Package io.debezium.jdbc
Class JdbcConnectionException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
io.debezium.jdbc.JdbcConnectionException
- All Implemented Interfaces:
Serializable
RuntimeException which is raised for various SQLException instances and which retains the error
code from the original exception.- Author:
- Horia Chiorean (hchiorea@redhat.com)
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intprivate static final longprivate final String -
Constructor Summary
ConstructorsConstructorDescriptionJdbcConnectionException(String message, SQLException e) Creates a new exception instance, wrapping the supplied SQLException with a custom messageCreates a new exception instance, wrapping the supplied SQLException -
Method Summary
Modifier and TypeMethodDescriptionintReturns the SQL error code from the original exceptionReturns the SQL state from the original exceptionMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
sqlState
-
errorCode
private final int errorCode
-
-
Constructor Details
-
JdbcConnectionException
Creates a new exception instance, wrapping the supplied SQLException- Parameters:
e- aSQLExceptioninstance, may not be null
-
JdbcConnectionException
Creates a new exception instance, wrapping the supplied SQLException with a custom message- Parameters:
message- the exception message, may not be nulle- aSQLExceptioninstance, may not be null
-
-
Method Details
-
getSqlState
Returns the SQL state from the original exception- Returns:
- the SQL state string
- See Also:
-
getErrorCode
public int getErrorCode()Returns the SQL error code from the original exception- Returns:
- the SQL error code
- See Also:
-