diff options
author | Eric Anholt <eric@anholt.net> | 2009-11-20 14:00:42 +0100 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2009-11-21 00:18:15 +0100 |
commit | 59c241ebd0e05abb38e1feb510116b4b97b2baa6 (patch) | |
tree | 07ed443466e847fd6aa82e0fdf6422ed84b3ad92 | |
parent | a8e0d4f25f78d3dcd8651ebb096f1c3d86037e72 (diff) |
When a search query triggers a Xapian exception, log what the query was.
In my script containing a series of queries to be run on new mail for
setting up tags, it's nice to see which query I typed wrong.
Signed-off-by: Eric Anholt <eric@anholt.net>
-rw-r--r-- | lib/query.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/query.cc b/lib/query.cc index 75f22b30..ea521dd8 100644 --- a/lib/query.cc +++ b/lib/query.cc @@ -151,6 +151,7 @@ notmuch_query_search_messages (notmuch_query_t *query, } catch (const Xapian::Error &error) { fprintf (stderr, "A Xapian exception occurred: %s\n", error.get_msg().c_str()); + fprintf (stderr, "Query string was: %s\n", query->query_string); } return _notmuch_messages_create (message_list); |