From: David Bremner Date: Sun, 5 Jul 2020 13:00:17 +0000 (-0300) Subject: lib: use LOG_XAPIAN_EXCEPTION in n_m_get_date X-Git-Tag: 0.31_rc0~147 X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=commitdiff_plain;h=e404d8a51d81a7dff85e28aeb64acdca5483652f lib: use LOG_XAPIAN_EXCEPTION in n_m_get_date This should not change functionality, but does slightly reduce code duplication. Perhaps more importantly it allows consistent changes to all of the similar exception handling in message.cc. --- diff --git a/lib/message.cc b/lib/message.cc index 8e43a393..f4306e2c 100644 --- a/lib/message.cc +++ b/lib/message.cc @@ -1191,9 +1191,7 @@ notmuch_message_get_date (notmuch_message_t *message) try { value = message->doc.get_value (NOTMUCH_VALUE_TIMESTAMP); } catch (Xapian::Error &error) { - _notmuch_database_log (notmuch_message_get_database (message), "A Xapian exception occurred when reading date: %s\n", - error.get_msg ().c_str ()); - message->notmuch->exception_reported = true; + LOG_XAPIAN_EXCEPTION (message, error); return 0; }