Subject | Re: when statement error codes |
---|---|
Author | aalliana |
Post date | 2012-05-10T20:54:48Z |
Thanks Ann for the answer.
I'm not sure what you mean by "interface you are using".
Let me clarify my doubt a little more:
I'm using the procedure/trigger language.
In a procedure, the following block:
when any do begin
...
end
catches the error and/or exceptions.
I'd like to access the parameters using the same procedure language.
Is that possible?
I'm using Firebird 2.1.4
thanks in advance
Alejandro
I'm not sure what you mean by "interface you are using".
Let me clarify my doubt a little more:
I'm using the procedure/trigger language.
In a procedure, the following block:
when any do begin
...
end
catches the error and/or exceptions.
I'd like to access the parameters using the same procedure language.
Is that possible?
I'm using Firebird 2.1.4
thanks in advance
Alejandro
--- In firebird-support@yahoogroups.com, Ann Harrison <aharrison@...> wrote:
>
> On Wed, May 9, 2012 at 10:57 AM, aalliana <aalliana@...> wrote:
>
> > Hello,
> >
> > whenever I use the when exception, when any, etc statement in a stored
> > procedure I loose information on what exception is thrown.
> >
> > I found a document called fb_2_1_errorcodes.pdf that helps me find what
> > kind of error was "catched". i.e.
> >
> > -836 335544517 except Exception @1
> >
> > -834 335544508 range_not_found Refresh range number @1 not found
> >
>
> In its native interface, Firebird returns an array of status for each
> statement. The first element in the array is the primary error code - the
> horrible 3355xxx number (which relates to the error code ranges assigned to
> layered products by the VAX/VMS group at DEC). The error code is followed
> a 32 bit word that indicates what the next word means - possibly a
> secondary error code that's more specific, possibly an argument. In this
> case, whatever interface you're using isn't bothering with anything but the
> first error ... which contains placeholders for arguments that make the
> error more comprehensible.
>
> Good luck,
>
> Ann
>
> >
> > Is there a way I can access the @x values so I can use them in any way?
> > (insert them in a table, etc).
> >
> > Thanks in advance.
> >
> > Alejandro
> >
> >
> >
> > ------------------------------------
> >
> > ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> >
> > Visit http://www.firebirdsql.org and click the Resources item
> > on the main (top) menu. Try Knowledgebase and FAQ links !
> >
> > Also search the knowledgebases at http://www.ibphoenix.com
> >
> > ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> > Yahoo! Groups Links
> >
> >
> >
> >
>
>
> [Non-text portions of this message have been removed]
>