Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

RAISE_APPLICATION_ERROR - Warning Message

733880Oct 11 2010 — edited Oct 11 2010
Hello All,

When i am executing the procedure; it says the following warning message.

"Avoid use of RAISE_APPLICATION_ERROR built-in with a hard-coded -20,NNN error number or hard-coded message."


But my doubt is that; if we are using raise_application_error then definitely the range (-20,999 -> -20,000 ) should be given.

How can i resolve this warning message?


My procedure is in the below fashion:
PROCEDURE p_test IS
..
BEGIN
..
..
EXCEPTION
 WHEN OTHERS THEN

   ROLLBACK;

   -- Update Failure
	UPDATE ...

      SET ...
    WHERE ...


   raise_application_error(-20010

                          ,'Error While Processing: ' ||

                           p_emp_id || ',SQLCODE = ' || SQLCODE || ' : ' ||

                           SQLERRM);
END of procedure;
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 8 2010
Added on Oct 11 2010
6 comments
3,905 views