Re: Re: Java bindings exceptions [was Re: Asking Help]
| Newsgroups | gmane.comp.search.xapian.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi, thank you for your letter, I get the message! 李猛 硕士研究生 手机:13051579861 邮箱:[email protected] 北京邮电大学信息与电子技术研究室 北京市海淀区西土城路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