diff options
| author | Anton Khirnov <anton@khirnov.net> | 2025-07-28 16:26:56 +0200 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2025-08-04 10:43:35 -0300 |
| commit | 11d373b4fd05f5409bf5c49459fe141d2235f7f5 (patch) | |
| tree | bb194cb1fe5bce7696f7536e883d7acebe7cdab3 /lib/notmuch-private.h | |
| parent | 32af882648325ba1a24f031c0d2728b2553a5e6e (diff) | |
lib: add notmuch_threads_status()
While a number of errors can happen when iterating over threads
(DatabaseModifiedError, memory allocation errors, etc.), the API
currently cannot signal them to the caller, and either triggers an
internal error (aborting the caller) or returns NULL from
notmuch_threads_get() with no information on what actually went wrong.
Add a new public function notmuch_threads_status() - similar to
previously added notmuch_messages_status() - that allows propagating
those errors to the caller.
Use this to remove the INTERNAL_ERROR() in _notmuch_thread_create()
(triggered by T642).
Fixes: https://github.com/pazz/alot/issues/1460
Amended-By: db. Resolved whitespace disagreement between emacs and
uncrustify in favour of uncrustify.
Diffstat (limited to 'lib/notmuch-private.h')
| -rw-r--r-- | lib/notmuch-private.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/notmuch-private.h b/lib/notmuch-private.h index db49e77d..89ab5397 100644 --- a/lib/notmuch-private.h +++ b/lib/notmuch-private.h @@ -707,14 +707,15 @@ _notmuch_filenames_create (const void *ctx, /* thread.cc */ -notmuch_thread_t * +notmuch_private_status_t _notmuch_thread_create (void *ctx, notmuch_database_t *notmuch, unsigned int seed_doc_id, notmuch_doc_id_set_t *match_set, notmuch_string_list_t *excluded_terms, notmuch_exclude_t omit_exclude, - notmuch_sort_t sort); + notmuch_sort_t sort, + notmuch_thread_t **thread); /* indexopts.c */ |
