Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Reraising an error in a procedure.

Re: Reraising an error in a procedure.

From: Ervin Fried <ervinf_at_netcom.ca>
Date: Tue, 14 Jul 1998 21:22:25 GMT
Message-ID: <6ogia7$2es$3@tor-nn1.netcom.ca>


In article <35A801D7.215F895F_at_tip.nl>, Maarten Geurts <mgeurts_at_tip.nl> wrote:

>Normally you could put a "raise;" behind the my_check_error to do this
>but for this case i would have to change a lot of code. Now its done
>with a raise_applicaton_error(-20099,parm_sqlerrm). This however results
>in an -20099 error, and i want to maintain the original error (like -60
>for a deadlock). pragma exception init does not handle variables, it
>needs a litaral numbers

try:

begin

'RAISE' will re-raise the last error

if you want on the safe side then you can also try:

begin

exception

      when others then
        -- save error code
        nErr := SQLCODE
          -- code to log error
         RAISE nErr;

end;

Ervin Received on Tue Jul 14 1998 - 16:22:25 CDT

Original text of this message

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