Marcus Ramberg
2005-Aug-22 19:33 UTC
[Xapian-discuss] queryparser dies badly on double search words.
hey. I'm using the Search::Xapian interface version 0.9.2 (and xapian-core 0.9.2), and feeding the queryparser such things as "one AND NOT two" or "test NOT NOT really" makes it go "Aborted"... I've tried adding the exception handling from the other stubs to QueryParser.xs as well, but I still can't catch this error from perl. Does this mean it's not an exception being thrown? Hope someone has an idea. With regards Marcus Ramberg
R. Mattes
2005-Aug-23 12:02 UTC
[Xapian-discuss] Re: queryparser dies badly on double search words.
On Mon, 22 Aug 2005 20:32:52 +0200, Marcus Ramberg wrote:> hey. > I'm using the Search::Xapian interface version 0.9.2 (and xapian-core > 0.9.2), and feeding the queryparser such things as "one AND NOT two" > or "test NOT NOT really" makes it go "Aborted"... I've tried adding > the exception handling from the other stubs to QueryParser.xs as > well, but I still can't catch this error from perl. Does this mean > it's not an exception being thrown? > > Hope someone has an idea.Not an idea so far but i can repoduce the segfaults with my apache module, so it's likely to be a problem with the query parser. Cheers Ralf Mattes> With regards > Marcus Ramberg
Marcus Ramberg
2005-Aug-24 09:25 UTC
[Xapian-discuss] Re: queryparser dies badly on double search words.
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