From: Helen B. <he...@tp...> - 2003-11-26 11:32:23
|
Christian, This is the wrong place to raise it. You need to post this to firebird-devel, where Dmitry Yemanov will see it. He wrote the new exception handling code AND prepared the examples... regards, Helen At 06:30 PM 25/11/2003 +0100, Christian Danner wrote: >Hi Helen, > >at the 'SQLCODE and GDSCODE' section of the FB 1.5 Release Notes, I >found the following example: > > BEGIN > ... > WHEN SQLCODE -802 THEN > EXCEPTION E_EXCEPTION_1; > WHEN SQLCODE -803 THEN > EXCEPTION E_EXCEPTION_2; > WHEN ANY DO > EXECUTE PROCEDURE P_ANY_EXCEPTION(SQLCODE); > END > >I would interpret '...' as a list of statements, which the WHENs are >responsible for. > >This syntax matches with a remark in the IB6 Language Reference, page >179: > > IMPORTANT > If used, WHEN must be the last statement in a BEGIN...END block. > It should come after SUSPEND, if present. > > >TTFM? As far as I know a WHEN-Clause (including all-or-nothing >rollback-capability) is relevant only for the _single_ preceding >statement (or BEGIN...END block). Then the upper example would be >misleading and should be replaced by something like: > > BEGIN > ... > END > WHEN SQLCODE -802 THEN > EXCEPTION E_EXCEPTION_1; > WHEN SQLCODE -803 THEN > EXCEPTION E_EXCEPTION_2; > WHEN ANY DO > EXECUTE PROCEDURE P_ANY_EXCEPTION(SQLCODE); > > >Kind regards, > >Christian > > >------------------------------------------------------- >This SF.net email is sponsored by: SF.net Giveback Program. >Does SourceForge.net help you be more productive? Does it >help you create better code? SHARE THE LOVE, and help us help >YOU! Click Here: http://sourceforge.net/donate/ >_______________________________________________ >Firebird-docs mailing list >Fir...@li... >https://lists.sourceforge.net/lists/listinfo/firebird-docs |