Responding to Errors
When an error occurs, you can use the following Built-in subprograms to get information about the error, including the error number, type, and message:
- ERROR_TYPE (returns CHAR)
- ERROR_CODE (returns NUMBER)
- ERROR_TEXT (returns CHAR)
- DBMS_ERROR_CODE (returns NUMBER)
- DBMS_ERROR_TEXT (returns CHAR)
Related topic
About handling runtime errors in triggers