"Alexey I. Froloff" <raorn at raorn.name> writes: > >> > + void *local = talloc_new (message); >> we should handle ENOMEM here, I think. > There are 16 talloc_new() calls and ENOMEM is not handled > anywhere.
This makes me a bit sad but I agree it's not your fault ;). > >> > + /* _notmuch_message_add_term() may return >> > + * NOTMUCH_PRIVATE_STATUS_TERM_TOO_LONG here. We can't fix it, but >> > + * this is not a reason to exit with error... */ >> > + if (_notmuch_message_add_term (message, "list", list_id)) >> > + fprintf (stderr, "Warning: Not indexing List-Id: <%s>\n", list_id); >> This should say why the indexing failed. > There should be strerror-like function, then can give description > for a given status code. There is, but only for the public status values. I guess the most correct thing would be to check for equality with NOTMUCH_PRIVATE_STATUS_TERM_TOO_LONG, print an appropriate error message if so, and otherwise use notmuch_status_to_string(COERCE_STATUS(private_status)) d