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.
va_start (va_args, format);
+ fprintf (stderr, "Internal error: ");
vfprintf (stderr, format, va_args);
exit (1);
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