aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/message.cc
diff options
context:
space:
mode:
authorGravatar Carl Worth <cworth@cworth.org>2009-11-22 03:54:20 +0100
committerGravatar Carl Worth <cworth@cworth.org>2009-11-22 03:54:20 +0100
commite2341cbc09b503f996fd46b68f9d96ae6004025b (patch)
tree042bd073a0e34344025cf376453350793326599b /lib/message.cc
parent717279fbcf7e057957c7c6726cd4930393cd5fdf (diff)
Catch and optionally print about exception at database->flush.
If an earlier exception occurred, then it's not unexpected for the flush to fail as well. So in that case, we'll silently catch the exception. Otherwise, make some noise about things going wrong at the time of flush.
Diffstat (limited to 'lib/message.cc')
-rw-r--r--lib/message.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/message.cc b/lib/message.cc
index 4a5fae1e..017c47b2 100644
--- a/lib/message.cc
+++ b/lib/message.cc
@@ -201,6 +201,7 @@ _notmuch_message_create_for_message_id (notmuch_database_t *notmuch,
} catch (const Xapian::Error &error) {
fprintf (stderr, "A Xapian exception occurred creating message: %s\n",
error.get_msg().c_str());
+ notmuch->exception_reported = TRUE;
*status_ret = NOTMUCH_PRIVATE_STATUS_XAPIAN_EXCEPTION;
return NULL;
}