Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: How get oracle message error on exception on PL/SQL
"Francky" <fgendre_at_sinfor.fr> schrieb im Newsbeitrag
news:8odm12$1n03$1_at_news6.isdnet.net...
> In my PL/SQL code I get exception in section EXCEPTION / WHEN OTHERS, and
I
> want trace the Oracle message associated? How I can do this ?
> Thanks
> --
>
Hi,
for example (very simplified!)
from Feuerstein, Pribyl:PL/SQL-PROGRAMMING 2nd Edition, O´Reilly
...
when others then
V_E_CODE := SQLCODE; -------------------------------declare the variables V_E_TXT := SUBSTR (SQLERRM, 1, 200);-------in the declare section! INSERT INTO YOUR_TABLE------------------------------table for tracing (CODE, MESSAGE, USER_NAME) VALUES(V_E_CODE , V_E_TXT ,USER );
...
HTH Jakob Received on Mon Aug 28 2000 - 08:38:35 CDT
![]() |
![]() |