Class JdbcConnectionException

All Implemented Interfaces:
Serializable

public final class JdbcConnectionException extends RuntimeException
RuntimeException which is raised for various SQLException instances and which retains the error code from the original exception.
Author:
Horia Chiorean ([email protected])
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • sqlState

      private final String sqlState
    • errorCode

      private final int errorCode
  • Constructor Details

    • JdbcConnectionException

      public JdbcConnectionException(SQLException e)
      Creates a new exception instance, wrapping the supplied SQLException
      Parameters:
      e - a SQLException 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 null
      e - a SQLException instance, may not be null
  • Method Details

    • getSqlState

      public String 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: