X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=lib%2Fmessage.cc;h=5bc7aff1386a4a7e09a461f98f7e37f86e5a3f58;hb=ee1f573204f87a0b2c20a193abf5c4d71e91f049;hp=b84e5e1c8895deae3d7c88d62e3235341120053b;hpb=9b73a8bcc9cb381fc1a15013f4baa3ec9fdb97a7;p=notmuch diff --git a/lib/message.cc b/lib/message.cc index b84e5e1c..5bc7aff1 100644 --- a/lib/message.cc +++ b/lib/message.cc @@ -252,7 +252,7 @@ _notmuch_message_create_for_message_id (notmuch_database_t *notmuch, doc_id = _notmuch_database_generate_doc_id (notmuch); } catch (const Xapian::Error &error) { - fprintf (stderr, "A Xapian exception occurred creating message: %s\n", + _notmuch_database_log(_notmuch_message_database (message), "A Xapian exception occurred creating message: %s\n", error.get_msg().c_str()); notmuch->exception_reported = TRUE; *status_ret = NOTMUCH_PRIVATE_STATUS_XAPIAN_EXCEPTION; @@ -437,7 +437,8 @@ _notmuch_message_ensure_message_file (notmuch_message_t *message) if (unlikely (filename == NULL)) return; - message->message_file = _notmuch_message_file_open_ctx (message, filename); + message->message_file = _notmuch_message_file_open_ctx ( + _notmuch_message_database (message), message, filename); } const char * @@ -467,7 +468,7 @@ notmuch_message_get_header (notmuch_message_t *message, const char *header) return talloc_strdup (message, value.c_str ()); } catch (Xapian::Error &error) { - fprintf (stderr, "A Xapian exception occurred when reading header: %s\n", + _notmuch_database_log(_notmuch_message_database (message), "A Xapian exception occurred when reading header: %s\n", error.get_msg().c_str()); message->notmuch->exception_reported = TRUE; return NULL; @@ -921,7 +922,7 @@ notmuch_message_get_date (notmuch_message_t *message) try { value = message->doc.get_value (NOTMUCH_VALUE_TIMESTAMP); } catch (Xapian::Error &error) { - fprintf (stderr, "A Xapian exception occurred when reading date: %s\n", + _notmuch_database_log(_notmuch_message_database (message), "A Xapian exception occurred when reading date: %s\n", error.get_msg().c_str()); message->notmuch->exception_reported = TRUE; return 0;