aboutsummaryrefslogtreecommitdiff
path: root/lib/query.cc
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2025-08-06 07:43:06 +0200
committerDavid Bremner <david@tethera.net>2025-08-09 07:12:23 -0300
commitaa761727999b105711ba4ca789e0836a0a05cf9f (patch)
tree560091147ab6db4c6e1b0a6a34451f34963a7a03 /lib/query.cc
parentbee7a53194606757997f069f0e95ac862fbba0e0 (diff)
lib: return NOTMUCH_STATUS_OPERATION_INVALIDATED where appropriate
The overall goal is to allow clients to restart operations in situations where that is the response recommended by the underlying Xapian library. Amended-by: db, added above explanation
Diffstat (limited to 'lib/query.cc')
-rw-r--r--lib/query.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/query.cc b/lib/query.cc
index 1761cdc9..f93c26b3 100644
--- a/lib/query.cc
+++ b/lib/query.cc
@@ -206,7 +206,7 @@ _notmuch_query_string_to_xapian_query (notmuch_database_t *notmuch,
}
msg = error.get_msg ();
- return NOTMUCH_STATUS_XAPIAN_EXCEPTION;
+ return _notmuch_xapian_error ();
}
return NOTMUCH_STATUS_SUCCESS;
}
@@ -465,7 +465,7 @@ _notmuch_query_search_documents (notmuch_query_t *query,
notmuch->exception_reported = true;
talloc_free (messages);
- return NOTMUCH_STATUS_XAPIAN_EXCEPTION;
+ return _notmuch_xapian_error ();
}
}
@@ -786,7 +786,7 @@ _notmuch_query_count_documents (notmuch_query_t *query, const char *type, unsign
_notmuch_database_log_append (notmuch,
"Query string was: %s\n",
query->query_string);
- return NOTMUCH_STATUS_XAPIAN_EXCEPTION;
+ return _notmuch_xapian_error ();
}
*count_out = count;
@@ -893,7 +893,7 @@ _notmuch_query_expand (notmuch_database_t *notmuch, const char *field, Xapian::Q
"A Xapian exception occurred expanding query: %s\n",
error.get_msg ().c_str ());
msg = error.get_msg ();
- return NOTMUCH_STATUS_XAPIAN_EXCEPTION;
+ return _notmuch_xapian_error ();
}
return NOTMUCH_STATUS_SUCCESS;