diff options
| author | Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> | 2020-02-21 14:53:52 +0200 |
|---|---|---|
| committer | Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> | 2020-02-21 19:29:27 +0200 |
| commit | 650c4c052d571abf7a0ca896da67bd76df05212f (patch) | |
| tree | 8062e948c2b689562ecad280895343996aa3f298 /lib | |
| parent | ff79d2b7d3878c164be7e1b149a3fe31ac27a152 (diff) | |
store: catch exceptions in dtor
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/mu-store.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/mu-store.cc b/lib/mu-store.cc index 4154fd1..f347b7b 100644 --- a/lib/mu-store.cc +++ b/lib/mu-store.cc @@ -132,15 +132,14 @@ struct Store::Private { } - ~Private() { + ~Private() try { LOCKED; if (wdb()) { wdb()->set_metadata (ContactsKey, contacts_.serialize()); if (in_transaction_) // auto-commit. wdb()->commit_transaction(); } - - } + } MU_XAPIAN_CATCH_BLOCK; std::shared_ptr<Xapian::Database> db() const { if (!db_) |
