diff options
author | Tomi Ollila <tomi.ollila@iki.fi> | 2013-11-13 19:02:44 +0200 |
---|---|---|
committer | David Bremner <david@tethera.net> | 2013-11-17 20:25:43 -0400 |
commit | 19a89753ca20b269a131e747238925cce254c627 (patch) | |
tree | fc8048b92ceffde94a4976bc8627c90d0b8b51be /lib/database.cc | |
parent | 4d5986e8ad671c1f5504894af6fbe37ba314bed8 (diff) |
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.
Diffstat (limited to 'lib/database.cc')
-rw-r--r-- | lib/database.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/database.cc b/lib/database.cc index 3c008d68..3530cb65 100644 --- a/lib/database.cc +++ b/lib/database.cc @@ -918,8 +918,8 @@ notmuch_database_compact (const char *path, compactor.add_source (xapian_path); compactor.set_destdir (compact_xapian_path); compactor.compact (); - } catch (Xapian::InvalidArgumentError e) { - fprintf (stderr, "Error while compacting: %s\n", e.get_msg().c_str()); + } catch (const Xapian::Error &error) { + fprintf (stderr, "Error while compacting: %s\n", error.get_msg().c_str()); ret = NOTMUCH_STATUS_XAPIAN_EXCEPTION; goto DONE; } |