[Xapian-discuss] Bug in error handling for QueryParser in PHP
James Aylett
james-xapian@tartarus.org
Thu, 27 May 2004 17:35:22 +0100
On Thu, May 27, 2004 at 05:22:37PM +0100, Olly Betts wrote:
> > I'm not sure if errors can be caught in PHP though, or if queryparser
> > will need to return false.
>
> Currently queryparser throws "const char *" (no, really) if the query
> won't parse. This is wrong (it dates back to when it was an integral
> part of omega - it just never got changed to do something more sane).
>
> As you suggest, returning false would be better. Plus a method to read
> the error message.
Are you proposing dropping exception usage for the query parser? I'm
in favour of that. I'd be inclined to return non-zero on error,
because that's more Unix-like, but that's a minor issue.
J
--
/--------------------------------------------------------------------------\
James Aylett xapian.org
james@tartarus.org uncertaintydivision.org