From 81861514c9a86350d24322c1de80b284bd2c1033 Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Wed, 28 Oct 2009 12:46:50 -0700 Subject: [PATCH] Tweak formatting of internal error messages. Was neglecting to print the phrase "Internal error: " before, and for the duplicate message-ID error it's nice to actually see the duplicate IDs. --- database.cc | 1 + message.cc | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/database.cc b/database.cc index b7fb1f10..f01ffa4b 100644 --- a/database.cc +++ b/database.cc @@ -129,6 +129,7 @@ _internal_error (const char *format, ...) va_start (va_args, format); + fprintf (stderr, "Internal error: "); vfprintf (stderr, format, va_args); exit (1); diff --git a/message.cc b/message.cc index 60ddf8a8..75e752c8 100644 --- a/message.cc +++ b/message.cc @@ -276,8 +276,10 @@ notmuch_message_get_thread_id (notmuch_message_t *message) strncmp ((*i).c_str (), _find_prefix ("thread"), strlen (_find_prefix ("thread"))) == 0) { - INTERNAL_ERROR ("Message with document ID of %d has duplicate thread IDs.\n", - message->doc_id); + INTERNAL_ERROR ("Message %s has duplicate thread IDs: %s and %s\n", + notmuch_message_get_message_id (message), + message->thread_id, + (*i).c_str () + 1); } #endif -- 2.26.2