Home » SQL & PL/SQL » SQL & PL/SQL » RAISE_APPLICATION_ERROR (Oracle 10.2.0.5)
RAISE_APPLICATION_ERROR [message #623600] Thu, 11 September 2014 13:38 Go to next message
praveenramaswamy
Messages: 34
Registered: December 2013
Member
Dear Experts

Need your guidance. In a triggers exception section, I have a statement like :

raise_application_error(-20001, 'Display the error message');

So when an error is thrown its display the Oracle Error first followed by the customer message, like as shown below:

ORA-20001, Display the error message

I would want the ORA error to display at the end. I want the custom message to display first and then the ORA Error.

Can you please advice how can i do it?

Regards
Praveen
Re: RAISE_APPLICATION_ERROR [message #623601 is a reply to message #623600] Thu, 11 September 2014 14:10 Go to previous messageGo to next message
CraigB
Messages: 386
Registered: August 2014
Location: Utah, USA
Senior Member
You can't. That is the way the Raise_Application_Error procedure works and it can't be overriden.

Craig...
Re: RAISE_APPLICATION_ERROR [message #623602 is a reply to message #623600] Thu, 11 September 2014 14:11 Go to previous messageGo to next message
praveenramaswamy
Messages: 34
Registered: December 2013
Member
Is there a different logic that i can use.
Re: RAISE_APPLICATION_ERROR [message #623606 is a reply to message #623602] Thu, 11 September 2014 14:23 Go to previous message
Michel Cadot
Messages: 68641
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Trap the message in your application and modify it as you want.

Previous Topic: WHERE name != 'HENRY' excludes name which has NULL
Next Topic: ".." Character coming instead of "." while creating an excel spreadsheet from Oracle 10g
Goto Forum:
  


Current Time: Fri Apr 19 08:09:31 CDT 2024