java.sql.SQLException class supplies values for the getMessage, getSQLState, and getErrorCode calls of SQLException. java.sql.SQLException classchaining exceptions SQLExceptions

In addition, sometimes returns multiple SQLExceptions using the nextException chain. The first exception is always the most severe exception, with SQL Standard exceptions preceding those that are specific to .

For information on processing SQLExceptions, see "Working with SQLExceptions in an application" in the .

Exceptions raised by will generally be one of the refined subclasses of SQLException. These refined exceptions are raised under the conditions described by their respective API documentation. The subclasses include the following. For a complete list, see the API documentation for your version of the Java SE platform.

  • java.sql.SQLClientInfoException
  • java.sql.SQLDataException
  • java.sql.SQLFeatureNotSupportedException
  • java.sql.SQLIntegrityConstraintViolationException
  • java.sql.SQLInvalidAuthorizationSpecException
  • java.sql.SQLSyntaxErrorException
  • java.sql.SQLTransactionRollbackException
  • java.sql.SQLTransientConnectionException