Information provided in SQLExceptions

Derby provides the message, SQLState values, and error codes. Use the getSQLState and getMessage methods to view the SQLState and error messages. Use getErrorCode to see the error code. The error code defines the severity of the error and is not unique to each exception. The severity levels are described inorg.apache.derby.types.ExceptionSeverity.

Applications should also check for and process java.sql.SQLWarnings, which are processed in a similar way. Derby issues an SQLWarning if the create=true attribute is specified and the database already exists.