v1 _notmuch_message_ensure_metadata exception handling

Subject: v1 _notmuch_message_ensure_metadata exception handling

Date: Fri, 24 Feb 2017 23:45:09 -0400

To: notmuch@notmuchmail.org, eg@gaute.vetsj.com

Cc:

From: David Bremner



In id:1487583702.5ghl7kdkaw.astroid@strange.none Gaute provided a test
case that demonstrated an uncaught Xapian::DatabaseModifiedError in
_notmuch_message_ensure_metadata.

Starting with id:20170218144551.22925-2-david@tethera.net, I provided
one approach to dealing with this via error propagation. I believe the
current series is a better approach because it actually fixes the
problem (i.e. re-opens the database), and because it takes less code.

There are probably plenty of other places where the new
notmuch_database_open needs to be called.

Thread: