[Xapian-discuss] how to catch Xapian::DatabaseModifiedError in
andreas at startsiden.no
Wed Jan 30 09:56:30 GMT 2008
On Jan 26, 2008, at 7:15 PM, Markus Wörle wrote:
> The pod-documentation of Database.pm says:
> > reopen
> > This re-opens the database(s) to the latest available version(s).
> It can be
> > used either to make sure the latest results are returned, or to
> recover from
> > a Xapian::DatabaseModifiedError.
> I really would like to do that, but as soon as this exception
> occures my applications dies with a SIGABRT.
> Is there any posibility to catch a Xapian::DatabaseModifiedError
> with Search::Xapian in Perl?
> At the moment I need reopen() the database before each query, which
> seems the only way to handle concurrent reading and updating in with
> perl, but it feels not very neat.
I have the same issue, and have started creating a patch for
Search::Xapian in bug #230.
This bug is meant to be for the maintainer to use before releasing the
packages, as it generates the code from xapian-core exceptions, rather
than hardcode each exception in the bindings. I run a patched version
of 1.0.4 in production and catch Search::Xapian::DatabaseModifiedError
succesfully there with the exception-classes and patched Enquire.xs.
More information about the Xapian-discuss