Home » Developer & Programmer » Forms » raise_application_error
raise_application_error [message #302365] Mon, 25 February 2008 06:12 Go to next message
sinida1984
Messages: 83
Registered: September 2007
Location: India
Member
Hi all,
I have a database procedure which includes the code
if Qty < 0 then
raise_application_error(-20200, 'Quantity cannot be less than zero');
end if;
It is running correctly in SQL as this is showing 'Quantity cannot be less than zero' message. But when i call this procedure from froms, when the condition becomes true, one error is coming in forms as 'When-validate-item trigger raised unhandled exception ora-20200 (40735)'. Error number showing is the number which i gave in raise_application_error(). Can anyone help me to find why this is occuring. Actually it should display 'cannot be less than zero'. Please help.......

Thanks and regards
Sinida
Re: raise_application_error [message #302371 is a reply to message #302365] Mon, 25 February 2008 06:45 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
You could create an OUT parameter (in this procedure) and return the message to the form (and display it to end user).
Re: raise_application_error [message #302505 is a reply to message #302365] Mon, 25 February 2008 23:56 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
I think you need to do your own exception handling.

Search this forum for 'error_code' and 'error_text'.

David
Previous Topic: how to search form level packages
Next Topic: How to remove Oracle logo?
Goto Forum:
  


Current Time: Tue Feb 18 10:31:39 CST 2025