Re: Q: Triggers and raise_application_error

From: Jeff Waugh <jaw_at_falcon.ic.net>
Date: 1996/10/08
Message-ID: <53dhot$n5h_at_condor.ic.net>#1/1


Tony Farrow (tony_at_isotro.com) wrote:
> I am trying to remove any additional errors that are being produced
> when I run the exception handling.
 

> ...
 

> if (condition) then
> raise my_error;
> end if;
> ...
> exception
 

> when my_error then
> raise_application(-20001, ' My Error.');
> ....
 

> and this seems to work EXCEPT I get the following additional errors
> when I insert into the table.
 

> ORA-20001: My Error. << This is EXCELLENT
> ORA-06512: at line 18 << I DO NOT WANT to see this
> ORA-04088: error during execution of trigger 'tablename.trigger'
 

> Is there any way to handle the remaining two errors within my
> exception routine?
 

> regards
> tony
> tony_at_isotro.com

In your exception block add a handler for 'when others' and handle them as you desire. Exceptions will bubble up the call stack until they are handled ( either by you or by oracle (the error messages that you don't want to see))

HTH,
Jeff Waugh
Fairlane Training & Development Center
Dearborn, MI Received on Tue Oct 08 1996 - 00:00:00 CEST

Original text of this message