* [PATCH] cli/new: improve error reporting
@ 2017-07-15 2:01 David Bremner
2017-08-17 1:05 ` David Bremner
0 siblings, 1 reply; 2+ messages in thread
From: David Bremner @ 2017-07-15 2:01 UTC (permalink / raw)
To: notmuch, notmuch
Recently a user reported a crash in notmuch new, but because of
missing error reporting, all they could say was "A Xapian exception
occured". This commit adds the extra information available about
the error message in the exception.
---
notmuch-new.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/notmuch-new.c b/notmuch-new.c
index 3a60f7ca..16b4d022 100644
--- a/notmuch-new.c
+++ b/notmuch-new.c
@@ -291,8 +291,7 @@ add_file (notmuch_database_t *notmuch, const char *filename,
case NOTMUCH_STATUS_READ_ONLY_DATABASE:
case NOTMUCH_STATUS_XAPIAN_EXCEPTION:
case NOTMUCH_STATUS_OUT_OF_MEMORY:
- fprintf (stderr, "Error: %s. Halting processing.\n",
- notmuch_status_to_string (status));
+ (void) print_status_database("add_file", notmuch, status);
goto DONE;
default:
INTERNAL_ERROR ("add_message returned unexpected value: %d", status);
--
2.13.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-08-17 1:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-15 2:01 [PATCH] cli/new: improve error reporting David Bremner
2017-08-17 1:05 ` David Bremner
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).