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

Home -> Community -> Usenet -> c.d.o.server -> error handling in PL/SQL

error handling in PL/SQL

From: Norman Dunbar <Norman.Dunbar_at_lfs.co.uk>
Date: Wed, 14 Aug 2002 17:25:27 +0100
Message-ID: <E2F6A70FE45242488C865C3BC1245DA702816A5B@lnewton.leeds.lfs.co.uk>


Daud,

what exception did Oracle raise when you failed to connect ? Once you know that, you can do this :

create or replace procedure AAA ....
 cursor mycursor is select ... from mytable_at_remotedb;  ....
begin

 open mycursor;
 ...
except
  when <whatever_you_got> then

     raise_application_error(-20001, 'I cannot for the life of me get through to remotedb');
end;

Now when it fals to get through it will barf and you'll get a rather silly error message !

HTH Regards,
Norman.

PS. In Oracle 817 docs, see PL/SQL user guide & reference, chapter 6, error handling.

Cheers.



Norman Dunbar
Database/Unix administrator
Lynx Financial Systems Ltd.
mailto:Norman.Dunbar_at_LFS.co.uk
Tel: 0113 289 6265
Fax: 0113 289 3146
URL: http://www.Lynx-FS.com

-------------------------------------
Received on Wed Aug 14 2002 - 11:25:27 CDT

Original text of this message

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