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: pl/sql

RE: pl/sql

From: Karniotis, Stephen <Stephen_Karniotis_at_compuware.com>
Date: Mon, 29 Apr 2002 07:23:26 -0800
Message-ID: <F001.00451DAD.20020429072326@fatcity.com>


Hi Roland:

   Unfortunately, you do need to code an exception handler within each procedure. The scope of the exception exists within the procedure only. Packages are simply a collection of procedures. All code within the Package Body must be within a procedure.

   What I have done is create an exception handler process that informs me as to what procedure fails, what table was being processed, etc. It is quite simple, but does add a few extra lines and formality to your code. If you want this, I can send it to you directly.

   Please let me know.

Thank You

Stephen P. Karniotis
Product Architect
Compuware Corporation

Direct:	(248) 865-4350
Mobile:	(248) 408-2918
Email:	Stephen.Karniotis_at_Compuware.com
Web:	www.compuware.com

 -----Original Message-----
Sent:	Monday, April 29, 2002 10:54 AM
To:	Multiple recipients of list ORACLE-L
Subject:	pl/sql

Hallo,

I have a package which includes 5 different procedures. I would like an exception which tells me an error message if any of the procedures fail.

So if procedure 1 fails I would get an error message or if procedure number 2 would fail, or proc number 3 e tc then I would get an error message, which tells me which procedure that fails. I tried this, but didnt work. Just give me an easy example
on this. I tried to look it up in the manual but didnt get it work.

Should I put the exception after each procedureis finished.

Like this: And should I name the exceptions in different ways, for instance givethem the names EXCEPTIONS1, EXCEPTIONS2 etc.

p1
exception
p2
exeption
p3
exception
p4
exception
p5
exception

Thanks in advance

Roland

--

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

Author:
  INET: Roland.Skoldblom_at_ica.se

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).

The contents of this e-mail are intended for the named addressee only. It contains information that may be confidential. Unless you are the named addressee or an authorized designee, you may not copy or use it, or disclose it to anyone else. If you received it in error please notify us immediately and then destroy it.

--

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

Author: Karniotis, Stephen
  INET: Stephen_Karniotis_at_compuware.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 Mon Apr 29 2002 - 10:23:26 CDT

Original text of this message

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