Contents Index Using the RAISERROR statement in procedures Differences from Other SQL Dialects

ASA SQL User's Guide
  Transact-SQL Compatibility
    Error handling in Transact-SQL procedures

Transact-SQL-like error handling in the Watcom-SQL dialect


You can make a Watcom-SQL dialect procedure handle errors in a Transact-SQL-like manner by supplying the ON EXCEPTION RESUME clause to the CREATE PROCEDURE statement:

CREATE PROCEDURE sample_proc()
ON EXCEPTION RESUME
BEGIN
   ...
END

The presence of an ON EXCEPTION RESUME clause prevents explicit exception handling code from being executed, so avoid using these two clauses together.


Contents Index Using the RAISERROR statement in procedures Differences from Other SQL Dialects