Java bindings exceptions [was Re: Asking Help]

li_meng at bupt.edu.cn li_meng at bupt.edu.cn
Sat Aug 12 03:22:34 BST 2017


    Hi, thank you for your letter, I get the message!



李猛
硕士研究生
手机:13051579861
邮箱:li_meng at bupt.edu.cn
北京邮电大学信息与电子技术研究室
北京市海淀区西土城路10号(北京邮电大学)新科研楼434
 
From: Olly Betts
Date: 2017-08-10 06:40
To: 李猛; xapian-devel
Subject: Re: Java bindings exceptions [was Re: Asking Help]
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
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xapian.org/pipermail/xapian-devel/attachments/20170812/bc7183df/attachment-0001.html>


More information about the Xapian-devel mailing list