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
public final class JdbcConnectionException extends RuntimeException
RuntimeException
which is raised for variousSQLException
instances and which retains the error code from the original exception.- Author:
- Horia Chiorean ([email protected])
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private int
errorCode
private static long
serialVersionUID
private String
sqlState
-
Constructor Summary
Constructors Constructor Description JdbcConnectionException(String message, SQLException e)
Creates a new exception instance, wrapping the supplied SQLException with a custom messageJdbcConnectionException(SQLException e)
Creates a new exception instance, wrapping the supplied SQLException
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getErrorCode()
Returns the SQL error code from the original exceptionString
getSqlState()
Returns the SQL state from the original exception-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
sqlState
private final String sqlState
-
errorCode
private final int errorCode
-
-
Constructor Detail
-
JdbcConnectionException
public JdbcConnectionException(SQLException e)
Creates a new exception instance, wrapping the supplied SQLException- Parameters:
e
- aSQLException
instance, may not be null
-
JdbcConnectionException
public JdbcConnectionException(String message, SQLException e)
Creates a new exception instance, wrapping the supplied SQLException with a custom message- Parameters:
message
- the exception message, may not be nulle
- aSQLException
instance, may not be null
-
-
Method Detail
-
getSqlState
public String getSqlState()
Returns the SQL state from the original exception- Returns:
- the SQL state string
- See Also:
SQLException.getSQLState()
-
getErrorCode
public int getErrorCode()
Returns the SQL error code from the original exception- Returns:
- the SQL error code
- See Also:
SQLException.getErrorCode()
-
-