Subject | Re: [firebird-support] Exception hangling in stored procedure |
---|---|
Author | Helen Borrie |
Post date | 2010-11-26T21:28:30Z |
At 11:07 PM 26/11/2010, tomkrej wrote:
./heLen
>Hi, I find some manuals for exception handling using WHENYes. Unless you actually code something (a handler) that *handles* the exception in such a way that processing can continue, the flow will jump to EXIT and return control to the caller.
>
>in some of them there is an initialization of output parameter in WHEN block. I tried to do it in my database, but when I call the procedure like
>
>select * from procedure_with_when (:param1, :param2)
>
>and the exception is raised, the result is empty.
>no value is returned.
>
>Is it correct behavior?
>I had an idea that one of output parameters would inform whether the operation was successfull, or when not, why not(e.g. 0 = success, -1 = error 1, -2 = error 2, ...)Well, it could, if you incorporated some code that could provide that. ;-) Parameters are just containers for pieces of data. They have no magic powers of their own.
./heLen