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: Wed, 22 Jul 2020 09:15:56 -0300

To: notmuch@notmuchmail.org

Cc:

From: David Bremner


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.
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: