diff options
| author | David Bremner <david@tethera.net> | 2020-07-08 21:17:09 -0300 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2020-07-20 08:54:42 -0300 |
| commit | 765ca7bc08f83a3c0f9ebffe58dab03634e45f37 (patch) | |
| tree | fe6d0cf02f4bcbea9cea97f6e6bc19837c094a77 /lib/message.cc | |
| parent | a0c83e1fac88588ff6564dd82fbca29c2f5c78a5 (diff) | |
lib: fix return value for n_m_reindex
Also update the documentation for the behaviour of n_m_get_thread_id
that this fix relies on.
Diffstat (limited to 'lib/message.cc')
| -rw-r--r-- | lib/message.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/message.cc b/lib/message.cc index 09708ed9..87448101 100644 --- a/lib/message.cc +++ b/lib/message.cc @@ -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 */ |
