User's Guide
Part VI. SQL Anywhere Reference
Chapter 43. Watcom-SQL StatementsResignal an exception condition.
RESIGNAL [ exception-name ]
Within an exception handler in a procedure or trigger.
None.
None.
Within an exception handler, RESIGNAL allows you to quit the compound statement with the exception still active, or to quit reporting another named exception. The exception will be handled by another exception handler or returned to the application. Any actions by the exception handler before the RESIGNAL are not undone.
The following fragment returns all exceptions except for Column Not Found to the application.
...DECLARE COLUMN_NOT_FOUND EXCEPTION FOR SQLSTATE '52003';...EXCEPTIONWHEN COLUMN_NOT_FOUND THENSET message='Column not found' ;WHEN OTHERS THENRESIGNAL ;