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: Error produced when trigger do raise_application_error

Re: Error produced when trigger do raise_application_error

From: Karsten Farell <kfarrell_at_medimpact.com>
Date: Thu, 10 Oct 2002 23:05:05 GMT
Message-ID: <BInp9.3253$IG2.171482337@newssvr14.news.prodigy.com>


Karsten Farell wrote:
> What you need to do is handle the ORA errors on the client side in an
> EXCEPTION block, where you display the error message passed to
> RAISE_APPLICATION_ERROR. For example:
>
> DECLARE
> unable_to_delete exception;
> pragma exception_init (unable_to_delete, -20001);
> BEGIN
> ...
> EXCEPTION
> when unable_to_delete then
> dbms_output.put_line(sqlerrm);
> END;
>

Hit the Send too fast. Also need this in the EXCEPTION block to get rid of the ORA messages:

EXCEPTION
   when others then null; Received on Thu Oct 10 2002 - 18:05:05 CDT

Original text of this message

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