Exception classes
Exception classes indirectly define the exception type.
The default action can be changed by specifying the exception class in the
WHENEVER instruction.
| Class | Error reason | Default Action |
|---|---|---|
ERROR (or
SQLERROR) |
Language or SQL statement error. | STOP |
ANY ERROR (or ANY
SQLERROR) |
Language, SQL statement and expression error. | CONTINUE (1) |
NOT FOUND |
SQL statements returning status
NOTFOUND. |
CONTINUE |
WARNING |
SQL statements setting
SQLCA.SQLAWARN flags. |
CONTINUE |
For example, the following
WHENEVER instruction defines the behavior for
the ANY ERROR exception
class:WHENEVER ANY ERROR CONTINUE