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: to Raise or not to Raise, this is the question...

Re: to Raise or not to Raise, this is the question...

From: Martin Haltmayer <Martin.Haltmayer_at_d2mail.de>
Date: Thu, 08 Aug 2002 18:56:56 +0200
Message-ID: <3D52A2D8.4CC8DA7C@d2mail.de>


Maybe you don't need a parameter but you are just happy with a configurable error text:

SQL> begin
  2 raise_application_error (-20000, 'This is string 1');   3 end;
  4 /
begin
*
ERROR at line 1:
ORA-20000: This is string 1
ORA-06512: at line 2

Martin

FC wrote:
>
> "Daniel Morgan" <damorgan_at_exesolutions.com> wrote in message
> news:3D4D32FC.8DB54ECE_at_exesolutions.com...
> > FC wrote:
> >
> > > Hello there!
> > > Is there any way to pass a "parameter" to the Oracle error message
> handler?
> > > I've seen there are several error messages returning a composite message
> > > that is clearly made up of fixed text plus the <string> parameter, like
> > > "ORA-22285 non-existent directory or file for <string> operation".
> > >
> > > The only way to mimic internal parameterized messages is using
> > > Raise_application_error as far as I know.
> > >
> > > What if I want to raise the same error passing a value to <string> via a
> > > standard Raise statement ?
> > >
> > > Did I miss something in the docs ?
> > >
> > > Thanks,
> > > Flavio
> >
> > I'm not sure what it is you are actually asking. So hazarding a guess look
> at
> > PRAGMA EXCEPTION_INIT.
> >
> > Daniel Morgan
> >
>
> PRAGMA EXCEPTION_INIT doesn't allow me to pass the parameter I was referring
> to, but just to assign an internal oracle error to a user defined exception
> definition.
> I was referring to the ability of including variable text such as a file
> name inside the body of a standard oracle error message.
>
> Bye,
> Flavio
Received on Thu Aug 08 2002 - 11:56:56 CDT

Original text of this message

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