Oracle exception in the predefined description

Source: Internet
Author: User

Oracle exception in the predefined description

Oracle error exception information
ORA-0001 dup_val_on_index tries to break a unique limit
ORA-0051 timeout-on-resource timeout while waiting for resources
The ORA-0061 transaction-backed-out is canceled due to a deadlock transaction.
ORA-1001 invalid-cursor tries to use an invalid cursor
ORA-1012 not-logged-on is not connected to Oracle
Invalid user name/password for ORA-1017 login-denied
ORA-1403 not-data-found no data found
ORA-1422 too-rows select into returns multiple rows
ORA-1476 zero-divide tries to be division by zero
ORA-1722 invalid-number failed to convert a number
Internal error caused by insufficient ORA-6500 storage-Error Memory
Internal error in ORA-6501 Program-Error
ORA-6502 value-error conversion or truncation error
ORA-6504 rowtype-Mismatch master cursor reduction variable and PL/SQL variable
Incompatible row types
ORA-6511 cursor-already-open tries to open an existing cursor
ORA-6530 access-into-null attempts to assign a value to the property of a Null Object
ORA-6531 collection-is-null attempts to aggregate a collection other than exists)
The method is applied to a null PL/SQL table or varray.
ORA-6532 subscript-outside-limit references to nested or varray indexes out of declared range
Other
ORA-6533 subscript-beyond-count references to nested or varray indexes greater than set
Number of elements.

 

You can use raise_application_error to create your own error handling method. The syntax is as follows:

Raise_application_error (error_number, error_message, [keep_errors]);

Here error_number is the parameter from-20,000 to-20,999,
Error_message is the corresponding prompt information (<512 bytes ),
Keep_errors is optional. If keep_errors is set to true, a new error is added to the list of errors that have been thrown. If keep_errors = false (default), the new error will replace the current error list.
Example: raise_application_error (-20001, p_department | ''| p_course | 'doesn' t exist! ');

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.