mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-28 13:44:12 +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,7 +1602,8 @@ notmuch_message_add_tag (notmuch_message_t *message, const char *tag)
|
||||||
|
|
||||||
private_status = _notmuch_message_add_term (message, "tag", tag);
|
private_status = _notmuch_message_add_term (message, "tag", tag);
|
||||||
if (private_status) {
|
if (private_status) {
|
||||||
INTERNAL_ERROR ("_notmuch_message_add_term return unexpected value: %d\n",
|
return COERCE_STATUS (private_status,
|
||||||
|
"_notmuch_message_remove_term return unexpected value: %d\n",
|
||||||
private_status);
|
private_status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1636,7 +1637,8 @@ notmuch_message_remove_tag (notmuch_message_t *message, const char *tag)
|
||||||
|
|
||||||
private_status = _notmuch_message_remove_term (message, "tag", tag);
|
private_status = _notmuch_message_remove_term (message, "tag", tag);
|
||||||
if (private_status) {
|
if (private_status) {
|
||||||
INTERNAL_ERROR ("_notmuch_message_remove_term return unexpected value: %d\n",
|
return COERCE_STATUS (private_status,
|
||||||
|
"_notmuch_message_remove_term return unexpected value: %d\n",
|
||||||
private_status);
|
private_status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue