xapian-db: improve some error messages

Correctly handle re-opening a transaction after one has finished.

Recognize some database opening errors and give some better user hints.

Fixes #2615.
This commit is contained in:
Dirk-Jan C. Binnema
2023-12-29 11:00:36 +02:00
parent b222a8a3f5
commit f3f4ea65ab
2 changed files with 11 additions and 2 deletions

View File

@ -98,7 +98,7 @@ make_db(const std::string& db_path, Flavor flavor)
}
}
XapianDb::XapianDb(const std::string& db_path, Flavor flavor) :
XapianDb::XapianDb(const std::string& db_path, Flavor flavor):
path_(make_path(db_path, flavor)),
db_(make_db(path_, flavor)),
batch_size_{Config(*this).get<Config::Id::BatchSize>()}