During the execution of stored programs, special situations may occur and need to be handled, such as exiting the current program block. Users can define handlers for warnings or exceptions or specify error codes.
OceanBase Database supports the following PL exception handling statements:
The
DECLARE ... CONDITIONstatement is used to name exception conditions. For more information, see DECLARE ... CONDITION.The
DECLARE ... HANDLERstatement is used to declare handlers. For more information, see DECLARE ... HANDLER.The
RESIGNALstatement is used to modify exception information in exception handlers. For more information, see RESIGNAL.The
SIGNALstatement is used to trigger an exception condition. For more information, see SIGNAL.The
GET DIAGNOSTICSstatement is used to retrieve information from the diagnostic area. For more information, see GET DIAGNOSTICS.
For information about how the server selects a handler when an exception occurs, see Handler scope.
For information about the diagnostic area, see Diagnostic area.
