]> git.notmuchmail.org Git - notmuch/blobdiff - lib/message.cc
lib: convert relative filenames to absolute in n_d_index_file
[notmuch] / lib / message.cc
index 09708ed9dcb6d12d7ac888cdde0c5f20d6d8369d..64798413d957d89c61ba8ed9f38b7b0025ae1c48 100644 (file)
@@ -96,7 +96,7 @@ static void
 _log_xapian_exception (const char *where, notmuch_message_t *message,  const Xapian::Error error) {
     notmuch_database_t *notmuch = notmuch_message_get_database (message);
     _notmuch_database_log (notmuch,
-                          "A Xapian exception occurred %s retrieving %s : %s\n",
+                          "A Xapian exception occurred at %s: %s\n",
                           where,
                           error.get_msg ().c_str ());
     notmuch->exception_reported = true;
@@ -2205,8 +2205,10 @@ notmuch_message_reindex (notmuch_message_t *message,
     /* Save in case we need to delete message */
     orig_thread_id = notmuch_message_get_thread_id (message);
     if (! orig_thread_id) {
-       /* XXX TODO: make up new error return? */
-       INTERNAL_ERROR ("message without thread-id");
+       /* the following is correct as long as there is only one reason
+          n_m_get_thread_id returns NULL
+       */
+       return NOTMUCH_STATUS_XAPIAN_EXCEPTION;
     }
 
     /* strdup it because the metadata may be invalidated */