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

Home -> Community -> Usenet -> c.d.o.tools -> Re: How get oracle message error on exception on PL/SQL

Re: How get oracle message error on exception on PL/SQL

From: Jakob Wittmann <jakobw_at_gmx.at>
Date: Mon, 28 Aug 2000 15:38:35 +0200
Message-ID: <8odq3k$al48b$1@ID-45057.news.cis.dfn.de>

"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

Original text of this message

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