Re: [PATCH 4/4] lib/n_d_get_version: catch exceptions and clarify the API

Subject: Re: [PATCH 4/4] lib/n_d_get_version: catch exceptions and clarify the API

Date: Thu, 23 Jul 2020 07:12:51 -0300

To: notmuch@notmuchmail.org

Cc:

From: David Bremner


David Bremner <david@tethera.net> writes:

> David Bremner <david@tethera.net> writes:
>
>> notmuch_database_get_version previously returned 0 on some errors, but
>> did not document this. Luckily 0 is not a valid database version.
>> +static void
>> +_log_xapian_exception (const char *where, notmuch_database_t *notmuch,  const Xapian::Error error) {
>> +    _notmuch_database_log (notmuch,
>> +			   "A Xapian exception occurred %s accessing %s : %s\n",
>> +			   where,
>> +			   error.get_msg ().c_str ());
>> +    notmuch->exception_reported = true;
>> +}
>> +
>
> I realized this has the same extra '%s' as fixed in
>
>   id:20200722120905.472562-2-david@tethera.net
>
> for message.cc. So this patch will need to be updated, and possibly some
> of the tests as well.

updated version applied to master.

d
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: