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

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Galina

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

    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_C ODE is null or
    :new.FES_UIO_CA LOCC is null then
    RAISE_APPLICATI ON_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’d prefer my users not to see. I found numerous
    opinions that these messages are OK. One of the answers in this ng:
    “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”

    How to define exception entry? How to hide ORA-06512 and ORA-04088
    error messages?

    Thank you for your help.
    Galina
  • Daniel Roy

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

    It's not really possible in SQL*Plus. Take a look at
    "http://asktom.oracle.c om/pls/ask/f?p=4950:8:6890 696327207967146 ::NO::F4950_P8_ DISPLAYID,F4950 _P8_CRITERIA:19 5612348072,"
    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_C ODE is null or
    :new.FES_UIO_CA LOCC is null then
    RAISE_APPLICATI ON_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’d prefer my users not to see. I found numerous
    opinions that these messages are OK. One of the answers in this ng:
    “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”
    >
    How to define exception entry? How to hide ORA-06512 and ORA-04088
    error messages?
    >
    Thank you for your help.
    Galina

    Comment

    Working...