[Xapian-discuss] PHP Fatal error while indexing Wikipedia

Robert Young bubblenut at gmail.com
Thu Jan 3 01:39:42 GMT 2008


On Jan 3, 2008 12:12 AM, Olly Betts <olly at survex.com> wrote:
> We already throw PHP exceptions for Xapian exceptions for PHP5, so it's
> certainly possible to implement.
>
> SWIG doesn't currently directly support throwing exceptions for errors
> like "incorrect parameters".  The best (and perhaps only) way to
> implement this would be to modify SWIG.  Perhaps it should always throw
> exceptions for such cases rather than it being an option.
>
> I doubt I'll have time to look at this for a while, but if someone comes
> up with a suitable patch for SWIG, I can apply it (since I moonlight as
> SWIG's PHP maintainer!)

I won't be any help with SWIG I'm afraid but something else which I've
done a couple for this evening is wrapping the Xapian style iterators
up in PHP-SPL iterators so that they can be used in foreach loops,
also the ArrayAccess and Countable interfaces could be implemented for
quite a few as well. If I understand correctly the xapian.php file is
completely generated, but it might be nice to provide an extra file of
helpers. I'd be more than happy to put some bits together if you think
it would be usefull.

Cheers
Rob



More information about the Xapian-discuss mailing list