raise_application_error [message #302365] |
Mon, 25 February 2008 06:12  |
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 #302505 is a reply to message #302365] |
Mon, 25 February 2008 23:56  |
 |
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
|
|
|