Derby supplies values for the getMessage, getSQLState, and getErrorCode calls of SQLException.
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 "Working with Derby SQLExceptions in an application" in the Derby Developer's Guide.
Exceptions raised by Derby 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.