|Subject||RE: [firebird-php] Re: Trapping errors|
> > I use EzSQL - it parcels up the error message and let's me handle itdo you turn debug ON?
> > anything is shown.
> > OTOH - I'm not sure what you mean by the "not until the Fetch"
> part. That
> > violation is triggered on insert or update and it would be
> immediate - not
> > on fetch.
> I'm using EZSql as well, but the problem is that errors returned from
> Firebird to PHP that are system messages (I'm not sure if that's the best
> way to explain it, but these are errors that are not parsing errors, etc.)
> are not trapped during EZSql's normal query execution, but when
> it executes
> the ib_fetch_object clause. Consequently as the default for this
> is to make
> it silent (put a @ in front of ib_fetch_object), referential integrity and
> unique index constraints that I had placed on my database were never
> reported to my application.
> It may also be relevant that I use stored procedures for everything, so
> although the SP executes ok, if it returns an error it wasn't
> getting to my
> PHP application.
> After spending a couple of hours debugging and writing my own
> error handler
> for all of this, I now have it working exactly as I wanted to. But it is
> important to remember that EZSql doesn't report errors from FB that occur
> during a SP execution, particularly those that are related to RI or Unique
> index constraints. I have to trap this specifically during the
> ib_fetch_object part of its Query method.