Re: How to hide ORA-06512 and ORA-04088 error messages?

From: Daniel Roy <danielroy10junk_at_hotmail.com>
Date: 29 Jul 2003 06:52:06 -0700
Message-ID: <3722db.0307290552.14146b75_at_posting.google.com>


It's not really possible in SQL*Plus. Take a look at "http://asktom.oracle.com/pls/ask/f?p=4950:8:6890696327207967146::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:195612348072," for Tom Kyte's explanation as to why.

Daniel

> Hello
> I have created a trigger not to let records with certain fields null
> to be inserted into the table:
> BEGIN
> IF :new.RUL_CODE is null or
> :new.FES_UINS_CODE is null or
> :new.FES_UIO_CALOCC is null then
> RAISE_APPLICATION_ERROR(-20000,'Record is not saved. Check course
> record and try to save again.');
> end if;
> end;
>
> The trigger is set to fire before insert.
>
> The trigger does the trick preventing the record to go into the table,
> but besides my error message it shows also ORA-06512 and ORA-04088
> errors, which I&#8217;d prefer my users not to see. I found numerous
> opinions that these messages are OK. One of the answers in this ng:
> &#8220;It's normal situation. Your trigger raise application error.
> You need define exception entry for this error in block where you
> enter INSERT statement.
> With best regards, Igor Kirasirov&#8221;
>
> How to define exception entry? How to hide ORA-06512 and ORA-04088
> error messages?
>
> Thank you for your help.
> Galina
Received on Tue Jul 29 2003 - 15:52:06 CEST

Original text of this message