Subject Re: [firebird-php] ibase_query and exceptions
Author Lester Caine
Yves Glodt wrote:
> Hello,
> I seem to have problems using exceptions:
> try {
> $sth = call_user_func_array('ibase_query', array_merge(array($c(), $q), $p));
> } catch (Exception $e) {
> echo 'Exception: '.$e->getMessage();
> exit;
> }
> This code never reaches the "catch" block, even I use an invalid SQL in $q.
> Does anyone have experience in using exceptions with the ibase_* functions?

What exception would you expect to be returned?
If there is a problem with the query, then the FUNCTION returns with an error
code. It does not 'throw an exception'. You would have to create an exception
from the error code to do this, but that is not how I would normally do it. I
just handle the error returned.

Lester Caine - G8HFL
Contact -
L.S.Caine Electronic Services -
EnquirySolve -
Model Engineers Digital Workshop -
Firebird -