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 -> Re: PACKAGEs; exception propagation

Re: PACKAGEs; exception propagation

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Sat, 08 Jun 2002 16:24:18 +0200
Message-ID: <cg44guc9e7d3c5reolls5gu6qq7lhj2pgj@4ax.com>


On Sat, 8 Jun 2002 12:22:09 +0200, "ronald" <ronald_at_foo.com> wrote:

>"Connor McDonald" <connor_mcdonald_at_yahoo.com>
>
>[...]
>
>
>Thanks Connor, but -- how should I put it -- this was a generic
>answer.
>
>I am a seasoned IT professional (relatively new to Oracle
>though), and I _really_ do know everything there is to be
>known about encapsulation, and "bubbling up" of exceptions.
>(BTW why can't PL/SQL exceptions propagate like Java
>exceptions?)
>
>I will clarify:
>
>1) my question about packages was directed mainly towards
>development. It's too awkward having to compile the _entire_
>package body each time when I make even the smallest change in
>the smallest procedure in the package body.
>
>2) my question about exceptions was directed towards
>propagating exceptions from a procedure P2 to the _calling_
>procedure P1. AFAIU, when there is an exception E in
>procedure P2, P2 exits to host environment. Is there a
>way to reraise/resend E to the calling procedure P1?
>
>
>
>If answers to both of those question is no, then sadly
>I have to state that PL/SQL needs some serious
>renovation.
>

1 recompiling a package body usually takes less than a minute. Are you really so impatient that you consider that to be 'awkward'? Using that word alone for me results in disbelief of your self-qualification as 'seasoned IT-professional'. You may be an IT-professional who seems to know everything better, see your last remark.

2 You didn't read Connor's reply.
If you define exception in a package header you can trap them from a calling procedure. If the calling procedure is outside the package you can trap them in the calling procedure using <package_name>.<exception_name> That might be 'awkward' again, but that's the way it is.

Time to do some reading to get acquainted with PL/SQL, I guess, probably the book of Steven Feuerstein. At least time to do some reading *before* you have your verdict ready and start to blame a product which many people can work with.

Regards

Sybrand Bakker, Senior Oracle DBA

To reply remove -verwijderdit from my e-mail address Received on Sat Jun 08 2002 - 09:24:18 CDT

Original text of this message

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