Saturday 26 May 2012

What is RAISE.APPLICATION_ERROR? | PL SQL

 The RAISE_APPLICATION_ERROR is a built-in procedure and part of the DBMS_STANDARD package. It is used to raise an exception and assign an error number and custom message to the user-defined errors in the stored programs. It is also used to report errors to the calling application and helps to avoid unhandled exceptions.
Following is the syntax of the RAISE APPLICATION_ERROR procedure:
RAISE_APPLICATION_ERROR  (error_number, message) In the preceding syntax, error_number is a negative integer in the range of 20999 to 20000, and message is a character string up to 2048 bytes long.