Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Reraising an error in a procedure.
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
![]() |
![]() |