# Derby exception messages and SQL states

The JDBC driver returns SQLExceptions for all errors from Derby. If the exception originated in a user type but is not itself an SQLException, it is wrapped in an SQLException. Derby-specific SQLExceptions use SQLState class codes starting with X. Standard SQLState values are returned for exceptions where appropriate.

Unimplemented aspects of the JDBC driver return a SQLException with a SQLState starting with `0A`. The exception class is java.sql.SQLFeatureNotSupportedException. These unimplemented parts are for features not supported by Derby.

Derby supplies values for the message and SQLState fields. In addition, Derby 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 Derby.

For information on processing SQLExceptions, see the Derby Developer's Guide.

- SQL error messages and exceptions