summaryrefslogtreecommitdiff
path: root/query.cc
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2009-10-25 10:22:41 -0700
committerCarl Worth <cworth@cworth.org>2009-10-25 10:54:49 -0700
commit7b227a6bf7eb409b4353adc430b2545166e0c4cd (patch)
tree9b82d6e3bec4596fdbbec6a7c449e00e3e19ad03 /query.cc
parent3b8e3ab666a54407f9596a53c66ba8ce623ac91d (diff)
Add an INTERNAL_ERROR macro and use it for all internal errors.
We were previously just doing fprintf;exit at each point, but I wanted to add file and line-number details to all messages, so it makes sense to use a single macro for that.
Diffstat (limited to 'query.cc')
-rw-r--r--query.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/query.cc b/query.cc
index f5ee7aa..88d76ef 100644
--- a/query.cc
+++ b/query.cc
@@ -178,8 +178,7 @@ notmuch_results_get (notmuch_results_t *results)
if (message == NULL &&
status == NOTMUCH_PRIVATE_STATUS_NO_DOCUMENT_FOUND)
{
- fprintf (stderr, "Internal error: a results iterator contains a non-existent document ID.\n");
- exit (1);
+ INTERNAL_ERROR ("a results iterator contains a non-existent document ID.\n");
}
return message;