Overview

2023-10-31 11:17:11  Updated

Exceptions may occur during the execution of a stored program. For example, a program block may exit unexpectedly. You can define exception handlers or specify error codes for warnings and exceptions.

OceanBase Database supports the following PL exception handling statements:

  • The DECLARE ... CONDITION statement names exception conditions. For more information, see DECLARE ... CONDITION.

  • The DECLARE ... HANDLER statement declares an exception handler. For more information, see DECLARE ... HANDLER.

  • The RESIGNAL statement modifies the exception information in an exception handler. For more information, see RESIGNAL.

  • The SIGNAL statement raises an exception condition. For more information, see SIGNAL.

  • The GET DIAGNOSTICS statement retrieves information from the diagnostics area. For more information, see GET DIAGNOSTICS.

You can specify how the server chooses an exception handler when an exception occurs. For more information, see Effective scope of an exception handler.

For more information about diagnostics areas, see Diagnostics area.

Contact Us