Jani Nikula <[email protected]> writes:
> On Fri, 24 Feb 2017, David Bremner <[email protected]> wrote:
>> The main expected use is to recover from a Xapian::DatabaseChanged
>> exception.
>
> I guess the main question here is if this should be exposed from the
> library or not. If the intention is to recover *within* the library, why
> add new API?
Yes that would work. Although as I mentioned on IRC, the API has been
proposed a few times before. I don't mind either way, it could always be
exposed later. In particular then I could feel less guilty about not yet
providing any bindings.
>> + notmuch->xapian_db->reopen ();
>> + } catch (const Xapian::Error &error) {
>> + if (! notmuch->exception_reported) {
>> + _notmuch_database_log (notmuch, "Error: A Xapian exception
>> reopening database: %s\n",
>> + error.get_msg ().c_str ());
>> + notmuch->exception_reported = TRUE;
>> + return NOTMUCH_STATUS_XAPIAN_EXCEPTION;
>> + }
>
> Move the above return out of the if block?
oh duh. good catch.
_______________________________________________
notmuch mailing list
[email protected]
https://notmuchmail.org/mailman/listinfo/notmuch