mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-21 18:38:08 +01:00
cli/new: improve error reporting
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.
This commit is contained in:
parent
84ae74aada
commit
1307868f1e
1 changed files with 1 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue