store: catch exceptions in dtor

This commit is contained in:
Dirk-Jan C. Binnema 2020-02-21 14:53:52 +02:00
parent ff79d2b7d3
commit 650c4c052d
1 changed files with 2 additions and 3 deletions

View File

@ -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_)