[Xapian-devel] Error handling in the bindings
James Aylett
james-xapian at tartarus.org
Sat Mar 3 03:22:40 GMT 2007
On Sat, Mar 03, 2007 at 01:46:41AM +0000, Olly Betts wrote:
> For all those that support classes with inheritance and throwing classes
> as exceptions, I think it should be fairly easy.
>
> Of the SWIG bindings, Python and C# do. Ruby almost certainly does, but
> I don't know it very well. PHP5 does, but PHP4 doesn't support
> exceptions (the current approach is clumsy, but probably about as good
> as we're likely to get there). Tcl8 essentially only supports throwing
> a string from what I recall (but I could be wrong).
Given Xapian needs to be installed -- ie there are going to be very
few "standard" hosting providers that support it -- we don't have to
worry about PHP4 too much. Most of the PHP extensions and useful bits
of code have started dropping PHP4 support now. (At least, most of the
ones I find.)
I was always intending to add proper exception support to the Python
bindings, but I never found the time.
> > and it would be nice to get this done before we release 1.0 if
> > possible, so unless someone shouts up with a reason that it's not a
> > good idea to try this, I'll try making a patch to fix up the Python
> > exception handling next week, to see how feasible it is.
>
> I think it would be very useful. And 1.0 would be a natural point to
> make such a change.
>
> I am starting to wonder at the number of things that have been noted
> as "ought to be done for 1.0" though. It would be good to get it
> released for the UTF-8 support. Perhaps we should remember that we can
> have another "flag day" release for API changes, database changes, etc
> and just sort out any loose ends and release it.
I think UTF-8 with Python exception if Richard can get them in would
be a good thing. As you say, we can break BC again in future if
necessary. It's not like 1.0 is the last significant version...
J
--
/--------------------------------------------------------------------------\
James Aylett xapian.org
james at tartarus.org uncertaintydivision.org
More information about the Xapian-devel
mailing list