[Xapian-discuss] Re: queryparser dies badly on double search words.

Marcus Ramberg marcus at startsiden.no
Wed Aug 24 09:24:30 BST 2005


On Mon, 22 Aug 2005 13:24:45 +0200, R. Mattes wrote:

 > Well, i did some more testing and it seems that these malformed query
 > strings trigger an exception that can only be cought by
 >  catch (...) {
 > Hmm, looking at the sources in xapian-core/queryparser it _seems_  
like
 > the parser would only throw an exception of type (char *) but a  
handler
 > like: catch(char *mesg) doesn't catch that exception (our test  
program
 > receives signal 6 (= SIGABRT). Since queryparser.cc just throws
 > internal->errmsg (which is supposed to be of type(char *)) and since
 > this slot (err, member) is only set when the parse_query function is
 > left via 'goto done/return' i wonder whether qeryparser throws
 > internal->errmsg while it's still at it's initial value of NULL ...

Thanks a bundle.. With catch (...) { } I can at least get these  
turned into Perl errors, which works a lot nicer with my  
Catalyst::Model::Xapian module (soon to be released). I suppose it  
would be even better if it threw a proper exception tho :)

Marcus



More information about the Xapian-discuss mailing list