Java bindings exceptions [was Re: Asking Help]
Olly Betts
olly at survex.com
Wed Aug 9 23:40:35 BST 2017
On Wed, Aug 09, 2017 at 11:09:55PM +0100, Olly Betts wrote:
> The Xapian exception classes aren't wrapped for Java at the moment, so
> currently you'll get a java.io.IOException exception, and you can check
> for DatabaseModifiedError using code like this (untested):
>
> try {
> // Code which might cause DatabaseModifiedError.
> } catch (Exception e) {
Sorry, that should be:
} catch (java.io.IOException e) {
> if (e.toString().startsWith("DatabaseModifiedError:")) {
> // Deal with it.
> }
> }
Cheers,
Olly
More information about the Xapian-devel
mailing list