Subject Re: [firebird-php] How to capture exceptions?
Author Thomas Beckmann
Hi everybody,

as proposed by you, Lester and Jochem (thank you!), I switched to PHP5 [one
strange thing - and hint to everybody: I needed to add: "gds_db 3050/tcp"
to %windir%\system32\drivers\etc\services to get interbase.dll to work
(thank you, Frank)], but actually, the described problem is still present -
thus I kindly ask you - all of you, of course - for your knowledge again:

The problem is that firebird exceptions (as raised by "select 1/0 from
rdb$database;" or by this little script:
"
create exception E_TEST_EX 'Puff';
set term ^ ;
create procedure P_TEST_EX as begin exception E_TEST_EX; end ^
set term ; ^
execute procedure P_TEST_EX;
")
are silently ignored by PHP.

I found some hints that adding an error_handler would do the trick but
actually, this gets triggered on syntax errors only.

Thus: Is there any way to capture firebird exceptions in PHP?

Thank you for your hints!


Thomas Beckmann wrote:
> Hi Lester, hi Jochem,
>
>> >>you may be using an older version of the extension... what
>> >>version of php are you running this on (php4 perhaps)?
>
> Ok, I'll try php5.
>
>>Unfortunately there are no plans to port any of the additions added in
>>PHP5 back to the PHP4 builds. And any new work would be built on top of
>>the PHP5 version.
>>
>>I have to admit that I've not tested the PHP5 version fully, but I
>>currently get the errors I expect, and I'll have a try myself sometime.
--
Thomas.Beckmann@...
Martens & Prahl EDV, Wielandstr. 14c, 23558 Lübeck
Telefon 0451-39904-525 • Telefax -520/-559