mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-24 20:08:10 +01:00
lib: use COERCE_STATUS in n_m_{add,remove}_tag
Currently I don't know of a good way of testing this, but at least in principle a Xapian exception in _notmuch_message_{add,remove}_term would cause an abort in the library.
This commit is contained in:
parent
aa8e3f4487
commit
78e9b3467d
1 changed files with 6 additions and 4 deletions
|
@ -1602,8 +1602,9 @@ notmuch_message_add_tag (notmuch_message_t *message, const char *tag)
|
|||
|
||||
private_status = _notmuch_message_add_term (message, "tag", tag);
|
||||
if (private_status) {
|
||||
INTERNAL_ERROR ("_notmuch_message_add_term return unexpected value: %d\n",
|
||||
private_status);
|
||||
return COERCE_STATUS (private_status,
|
||||
"_notmuch_message_remove_term return unexpected value: %d\n",
|
||||
private_status);
|
||||
}
|
||||
|
||||
if (! message->frozen)
|
||||
|
@ -1636,8 +1637,9 @@ notmuch_message_remove_tag (notmuch_message_t *message, const char *tag)
|
|||
|
||||
private_status = _notmuch_message_remove_term (message, "tag", tag);
|
||||
if (private_status) {
|
||||
INTERNAL_ERROR ("_notmuch_message_remove_term return unexpected value: %d\n",
|
||||
private_status);
|
||||
return COERCE_STATUS (private_status,
|
||||
"_notmuch_message_remove_term return unexpected value: %d\n",
|
||||
private_status);
|
||||
}
|
||||
|
||||
if (! message->frozen)
|
||||
|
|
Loading…
Reference in a new issue