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

You can avoid having wrap the exception if:

(This conforms to the SQL99 standard.)