mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-28 13:44:12 +01:00
Print information about where Xapian exception occurred.
Previously, our Xapian exception reports where identical so they were hard to track down.
This commit is contained in:
parent
6c7ec294bb
commit
591f901241
2 changed files with 6 additions and 6 deletions
|
@ -513,7 +513,7 @@ notmuch_database_open (const char *path,
|
||||||
notmuch->query_parser->add_prefix (prefix->name, prefix->prefix);
|
notmuch->query_parser->add_prefix (prefix->name, prefix->prefix);
|
||||||
}
|
}
|
||||||
} catch (const Xapian::Error &error) {
|
} catch (const Xapian::Error &error) {
|
||||||
fprintf (stderr, "A Xapian exception occurred: %s\n",
|
fprintf (stderr, "A Xapian exception occurred opening database: %s\n",
|
||||||
error.get_msg().c_str());
|
error.get_msg().c_str());
|
||||||
notmuch = NULL;
|
notmuch = NULL;
|
||||||
}
|
}
|
||||||
|
@ -608,8 +608,8 @@ notmuch_database_set_timestamp (notmuch_database_t *notmuch,
|
||||||
db->replace_document (doc_id, doc);
|
db->replace_document (doc_id, doc);
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (Xapian::Error &error) {
|
} catch (const Xapian::Error &error) {
|
||||||
fprintf (stderr, "A Xapian exception occurred: %s.\n",
|
fprintf (stderr, "A Xapian exception occurred setting timestamp: %s.\n",
|
||||||
error.get_msg().c_str());
|
error.get_msg().c_str());
|
||||||
ret = NOTMUCH_STATUS_XAPIAN_EXCEPTION;
|
ret = NOTMUCH_STATUS_XAPIAN_EXCEPTION;
|
||||||
}
|
}
|
||||||
|
@ -983,8 +983,8 @@ notmuch_database_add_message (notmuch_database_t *notmuch,
|
||||||
|
|
||||||
_notmuch_message_sync (message);
|
_notmuch_message_sync (message);
|
||||||
} catch (const Xapian::Error &error) {
|
} catch (const Xapian::Error &error) {
|
||||||
fprintf (stderr, "A Xapian exception occurred: %s.\n",
|
fprintf (stderr, "A Xapian exception occurred adding message: %s.\n",
|
||||||
error.get_msg().c_str());
|
error.get_description().c_str());
|
||||||
ret = NOTMUCH_STATUS_XAPIAN_EXCEPTION;
|
ret = NOTMUCH_STATUS_XAPIAN_EXCEPTION;
|
||||||
goto DONE;
|
goto DONE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -149,7 +149,7 @@ notmuch_query_search_messages (notmuch_query_t *query,
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (const Xapian::Error &error) {
|
} catch (const Xapian::Error &error) {
|
||||||
fprintf (stderr, "A Xapian exception occurred: %s\n",
|
fprintf (stderr, "A Xapian exception occurred performing query: %s\n",
|
||||||
error.get_msg().c_str());
|
error.get_msg().c_str());
|
||||||
fprintf (stderr, "Query string was: %s\n", query->query_string);
|
fprintf (stderr, "Query string was: %s\n", query->query_string);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue