Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: user defined exception.

Re: user defined exception.

From: Dan Barr <dabarr_at_bigfoot.com>
Date: Wed, 23 Jan 2002 15:57:37 -0500
Message-ID: <3C4F23C1.2090002@bigfoot.com>


Have you looked into the built-in function RAISE_APPLICATION_ERROR?

Hugues Landry wrote:

> Thanks for the answer but...
> dbms_output does not work for me since i'm making call to the database
> using OCI call. Because of that i don't see the output send by dmbs_output.
> I do see the error thrown by oracle ( ORA-nnnnn ). Therefore i wanted to
> raise an exception that i would not catch. This way i make sure that if
> someone try to delete from my table not using my method, the execution
> will stop after rolling back. The only thing left to do is to have a clear
> error message for my exception.
>
> Any thought on this ??
>
> Hugues Landry
>
> "Daniel A. Morgan" <damorgan_at_exesolutions.com> wrote in message news:<3C4D5E9C.17D42A7E_at_exesolutions.com>...
>

>>EXCEPTION
>>   WHEN rtfm THEN
>>      DBMS_OUPUT.PUT_LINE('Another User Did Not RTFM');
>>   WHEN OTHER THEN
>>      DBMS_OUPUT.PUT_LINE('Something Else Happened');
>>
>>END;
>>
Received on Wed Jan 23 2002 - 14:57:37 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US