mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-22 19:08:09 +01:00
compact: catch Xapian::Error consistently
catch Xapian::Error in compact code in lib/database.cc to be consistent with other code in addition to not making software crash on uncaught other Xapian error.
This commit is contained in:
parent
4d5986e8ad
commit
19a89753ca
1 changed files with 2 additions and 2 deletions
|
@ -918,8 +918,8 @@ notmuch_database_compact (const char *path,
|
||||||
compactor.add_source (xapian_path);
|
compactor.add_source (xapian_path);
|
||||||
compactor.set_destdir (compact_xapian_path);
|
compactor.set_destdir (compact_xapian_path);
|
||||||
compactor.compact ();
|
compactor.compact ();
|
||||||
} catch (Xapian::InvalidArgumentError e) {
|
} catch (const Xapian::Error &error) {
|
||||||
fprintf (stderr, "Error while compacting: %s\n", e.get_msg().c_str());
|
fprintf (stderr, "Error while compacting: %s\n", error.get_msg().c_str());
|
||||||
ret = NOTMUCH_STATUS_XAPIAN_EXCEPTION;
|
ret = NOTMUCH_STATUS_XAPIAN_EXCEPTION;
|
||||||
goto DONE;
|
goto DONE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue