Overview
When an error occurrs in DBMS, An exception handler can handle exception.
The basic procedure for handling exception of ALTIBASE HDB is identical to ORACLE.
It includes declaring, raising exceptions. and so forth.
Exception
Exceptions can be divided into two categories.
For further information on the following exceptions, we recommend you to read the subdivided pages.
- System-defined exceptions
- User-defined exceptions
System-defined Exception
This exception is a predefined by the ALTIBASE HDB.
- General erros which can occur during the execution of the stored procedures.
- No need to declare name in the DECLARE section.
User-defined Exception
This exception is arbitraily defined by user.
- This exception can be specified and defined by user.
- This exception can be specified and defined in the DECLARE section.
- This exception can be ocurred using a RAISE statement.
- This exception can be processed in the EXCEPTION Handler.
Example
ORACLE |
ALTIBASE HDB |
Comments |
---|---|---|
DECLARE |
CREATE OR REPLACE PROCEDURE PROC1 |
Basic usages of exception handling are almost same |