Firebird 2.0
PSQL Reference
Manual

EXCEPTION HANDLERS – WHEN GDSCODE

Purpose

Use the GDSCODE error specification to create an error handler for a specific Firebird error condition.

Syntax

<gdscode_error> ::=
   GDSCODE <gds_error_name>

<gds_error_name> ::=   <identifier>



Element
Description
gds_error_name

The name of a Firebird system error

Semantics

GDS codes are Firebird system error codes. The abbreviation “GDS” comes from “Groton Database Systems”, the company that in the early eighties developed the first versions of what currently is the Firebird code base. GDS error codes are more fine-grained then SQL error codes.

See Appendix A for a list of GDS error codes and their meaning.

Examples

The below example shows a WHEN GDSCODE based handler:

DECLARE a INTEGER;
BEGIN
   a = 23 / a;
   WHEN GDSCODE arith_except DO
      BEGIN
      EXEPTION;
      END
END;


See also

Exception handlers, WHEN SQLCODE, WHEN EXCEPTION


previous page goto index next page

Legal information