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: DA Morgan <damorgan_at_x.washington.edu>
Date: Wed, 17 Nov 2004 22:37:20 -0800
Message-ID: <1100759756.234231@yasure>


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

What is it you are trying to actually accomplish? After reading what you wrote I am nothing if not confused.

Put the constants into a package header and use them universally.

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace 'x' with 'u' to respond)
Received on Thu Nov 18 2004 - 00:37:20 CST

Original text of this message

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