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

Home -> Community -> Mailing Lists -> Oracle-L -> Can we capture all errors through SQLERRM ?

Can we capture all errors through SQLERRM ?

From: Krishna Kakatur <master_dba_at_hotmail.com>
Date: Wed, 13 Jun 2001 14:19:02 -0700
Message-ID: <F001.0032890F.20010613142818@fatcity.com>

Hi,

How can I capture the second error message (ORA-06512: at line 4) in Exception handler? I want to capture all the messages and insert them into Error Log table.



SQL> declare
  2 n number;
  3 begin
  4 n := 'Not a Number';
  5 end;
  6 /
declare
*
ERROR at line 1:
ORA-06502: PL/SQL: numeric or value error ORA-06512: at line 4

SQL> declare
  2 n number;
  3 begin
  4 n := 'Not a Number';
  5 exception
  6 when others then
  7 dbms_output.put_line (SQLCODE ||' >>> '|| SQLERRM);   8 end;
  9 /
-6502 >>> ORA-06502: PL/SQL: numeric or value error

PL/SQL procedure successfully completed.


TIA, Krishna



Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Krishna Kakatur
  INET: master_dba_at_hotmail.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists

--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Wed Jun 13 2001 - 16:19:02 CDT

Original text of this message

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