public final class JdbcConnectionException extends RuntimeException
RuntimeException which is raised for various SQLException instances and which retains the error
code from the original exception.| Modifier and Type | Field and Description |
|---|---|
private int |
errorCode |
private static long |
serialVersionUID |
private String |
sqlState |
| Constructor and Description |
|---|
JdbcConnectionException(SQLException e)
Creates a new exception instance, wrapping the supplied SQLException
|
JdbcConnectionException(String message,
SQLException e)
Creates a new exception instance, wrapping the supplied SQLException with a custom message
|
| Modifier and Type | Method and Description |
|---|---|
int |
getErrorCode()
Returns the SQL error code from the original exception
|
String |
getSqlState()
Returns the SQL state from the original exception
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringprivate static final long serialVersionUID
private final String sqlState
private final int errorCode
public JdbcConnectionException(SQLException e)
e - a SQLException instance, may not be nullpublic JdbcConnectionException(String message, SQLException e)
message - the exception message, may not be nulle - a SQLException instance, may not be nullpublic String getSqlState()
SQLException.getSQLState()public int getErrorCode()
SQLException.getErrorCode()Copyright © 2019 JBoss by Red Hat. All rights reserved.