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: pragma exception_init with constant

Re: pragma exception_init with constant

From: Brian Dick <bdick_at_cox.net>
Date: Tue, 16 Nov 2004 13:34:52 -0500
Message-ID: <siijwg4pw036.150wshp78lqrn.dlg@40tude.net>


On Tue, 16 Nov 2004 18:40:31 +0100, Agoston Bejo wrote:

> I store the error codes my stored procedures may throw (by calling
> raise_application_error) as constants. One of my procedures has to catch the
> error another one throws, and I am trying to do this with pragma
> exception_init.
> It seems that it only accepts numeric literals (as it explicitly says so in
> the error message I get), but it would be great to be able not to hardwire
> the error codes I otherwise store in constants.
> Is there some workaround for this, so that I could achieve the same as if I
> wrote:
>
> pragma exception_init(myException, pkg_constants.error_not_null);

Steve Feuerstein published a two part article in Oracle Magazine titled "Managing Exceptional Behavior". The code for the article is a bit unorganized but it's a good place to start.

http://www.oracle.com/technology/oramag/oracle/03-may/o33plsql.html http://www.oracle.com/technology/oramag/oracle/03-jul/o43plsql.html Received on Tue Nov 16 2004 - 12:34:52 CST

Original text of this message

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