From 43c44cf6cd68f5a9ead8dee2ad3579c09552f199 Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Mon, 7 Feb 2022 22:34:49 +0200 Subject: [PATCH] store: catch dtor exception --- lib/mu-store.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/mu-store.cc b/lib/mu-store.cc index 01702310..b95a9a72 100644 --- a/lib/mu-store.cc +++ b/lib/mu-store.cc @@ -136,11 +136,13 @@ struct Store::Private { } ~Private() - { + try { g_debug("closing store @ %s", mdata_.database_path.c_str()); if (!read_only_) { transaction_maybe_commit(true /*force*/); } + } catch (...) { + g_critical("caught exception in store dtor"); } std::unique_ptr make_xapian_db(const std::string db_path, XapianOpts opts)