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

thank you for your almost immediate response!

> I can't get "select 1/0 from rdb$database;" to cause an exception.
> given that you used double quotes the $ should have been backslashed,
> also the semi-colon is not needed.
Of course, I did "ibase_query('select 1/0 from rdb$database');"...

> I can get this to work (i.e. trap the exception in php)....
> I have the following inside a custom DB class (written by the
> guy who [re]wrote the firebird extension!)
Ok, where can I get this class :-)...

> try {
> $r = DB::query('select 1/0 from rdb$database');
This did not lead to an exception?
> var_dump($r);
> }

> [.. code removed ...]
Hm, the main difference between the code you showed me and mine was that
I checked the result against being empty, not "is_resource" - but
actually, this makes no difference in my testsuite - conclusion: I need
the class you mention :-)...

> NOTE:
> none of the code aboves works as is (your missing about 25,000 lines which make up
> the framework within which it runs!) but you should be able to figure it out
> ... you are among the firebird/php elite ;-)
Well, I did WAMP/LAMP for more than 10 years... during the last years
firebird/Delphi got into my focus - of course you know what would
happen: I miss too many firebird features to continue with MySQL in my
web projects...
--
Thomas.Beckmann@...
Martens & Prahl EDV, Wielandstr. 14c, 23558 Lübeck
Telefon 0451-39904-525 • Telefax -559