Custom Exceptions
Firebird DDL provides a simple syntax for creating custom exceptions for use in PSQL modules, with message text of up to 1,021 characters. For more information, see in DDL Statements and, for usage, the statement EXCEPTION in PSQL Statements.
The Firebird error codes do not correlate with the standards-compliant SQLSTATE
codes. has been used for many years and should be considered as deprecated now. Support for SQLCODE
is likely to be dropped in a future version.
B.1 SQLSTATE Error Codes and Descriptions
This table provides the error codes and message texts for the context variables.
The structure of an SQLSTATE
error code is five characters comprising the SQL error class (2 characters) and the SQL subclass (3 characters).
Table B.1.1 SQLSTATE Codes and Message Texts