From 650c4c052d571abf7a0ca896da67bd76df05212f Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Fri, 21 Feb 2020 14:53:52 +0200 Subject: [PATCH] store: catch exceptions in dtor --- lib/mu-store.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/mu-store.cc b/lib/mu-store.cc index 4154fd16..f347b7bf 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 db() const { if (!db_)