Description: When the execution of a database-side method raises an error, Derby wraps that exception in an SQLException with an SQLState of 38000.
Keywords: SQLExceptions, user-defined (38001-38999)

# User-defined SQLExceptions

When the execution of a database-side method raises an error, Derby wraps that exception in an SQLException with an `SQLState` of 38000.

You can avoid having Derby wrap the exception if:

- The exception is an SQLException
- The range of the SQLState is 38001-38999

(This conforms to the SQL99 standard.)

Parent topic: Programming database-side JDBC procedures
Related concepts
Database-side JDBC procedures and nested connections
Database-side JDBC procedures using non-nested connections
Database-side JDBC procedures and SQLExceptions