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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: SQL*Plus errors... how to hide?

RE: SQL*Plus errors... how to hide?

From: Saira Somani-Mendelin <saira_somani_at_yahoo.com>
Date: Fri, 07 Nov 2003 06:17:12 -0800
Message-ID: <F001.005D5F8B.20031107061712@fatcity.com>

I like this solution. It works waaaaaaaaaaaaaaaaay better than the
dbms_lock.sleep() suggestion ;)  

Thank you.
Saira

-----Original Message-----
Sent: November 6, 2003 3:54 PM
To: ORACLE-L_at_fatcity.com
Cc: Saira Somani-Mendelin

Catch the error in an exception clause and ignore it.

SQL> set serveroutput on
SQL> run
  1 declare
  2 x number ;
  3 begin
  4 x := to_number ('123^') ;
  5 exception

  6     when value_error
  7     then
  8        dbms_output.put_line ('Bad Number') ;
  9     when others
 10     then
 11        raise ;

 12* end ;
Bad Number
Procedura PL/SQL completata correttamente.

--

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

Author: Saira Somani-Mendelin
  INET: saira_somani_at_yahoo.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
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 Fri Nov 07 2003 - 08:17:12 CST

Original text of this message

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