[Xapian-devel] Error handling in the bindings

Richard Boulton richard at lemurconsulting.com
Fri Mar 9 13:05:48 GMT 2007


Richard Boulton wrote:
> Olly Betts wrote:
>> I think it might be useful at this point to compare the code (C++ and
>> scripting language) generated now with that generated before your
>> recent changes.  The bindings testsuite isn't as complete as I'd
>> like, so it would be good to have confidence that this doesn't introduce
>> any problems.  I recall some subtle issues with SWIG-time versus compile
>> time preprocessing which took me a while to sort out with PHP, for
>> example.
> 
> That's a good idea - I'll check the code shortly.

Checked - the only difference was whitespace, and the license statement 
for tcl8's exception handling, which wasn't being put into the 
tcl8/xapian_wrap.cc file.  I've changed the latter to put the license 
statement back, since this happens with other such statements and I 
thought I should be consistent, but I'm not sure if it's really a good 
idea to have the license statements copied into the middle of the 
generated file.

Anyway - I've also got a script working for making Python throw Xapian 
exception types.  Even better, it gets the definitions of the exception 
classes from "xapian/error.h" rather than having to put them into the 
"except.i" file (I still need a script though, to generate the list of 
exception types in the exception handling function.  I'll commit that 
shortly.

-- 
Richard



More information about the Xapian-devel mailing list