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

Error produced when trigger do raise_application_error

From: Lusiana Lusiana <lusiana_at_nortelnetworks.com>
Date: Fri, 11 Oct 2002 08:35:20 +1000
Message-ID: <ao4v0i$mne$1@bcarh8ab.ca.nortel.com>


Hi All,

I wrote a trigger for enforcing a constraint. The trigger raises an error 20001 when some condition is met:

raise_application_error(-20001, 'Unable to delete role ' || :old.role_name || ' as it is being referenced by User ' || user.userid);

It behaves as expected, when trigger fires and the condition is met, the following error is produced:

ERROR at line 1:
ORA-20001: Unable to delete role all as it is being referenced by User superuser
ORA-06512: at "MYTEST.ROLE_DELETION", line 29 ORA-04088: error during execution of trigger MYTEST.ROLE_DELETION'

My question is, why the error ORA-06512 and ORA-04088 are also produced along with the raised ORA-20001?
Is this normal thing that happens when a trigger raise an error?

I have also been having a look at some similar trigger examples on the web, and it seems
that the examples also produce the errors ORA-06512 and ORA-04088. I'm using Oracle 8.1.6

Thanks in advance,

Lucy Received on Thu Oct 10 2002 - 17:35:20 CDT

Original text of this message

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