mu: improve error reporting

This commit is contained in:
Dirk-Jan C. Binnema
2022-05-15 13:40:44 +03:00
parent f2c0af7413
commit 6e37790012
4 changed files with 7 additions and 10 deletions

View File

@ -132,14 +132,10 @@ struct Store::Private {
} catch (const Xapian::DatabaseLockError& xde) {
throw Mu::Error(Error::Code::StoreLock,
"failed to lock store @ %s: %s",
db_path.c_str(),
xde.get_msg().c_str());
"%s", xde.get_msg().c_str());
} catch (const Xapian::DatabaseError& xde) {
throw Mu::Error(Error::Code::Store,
"failed to open store @ %s: %s",
db_path.c_str(),
xde.get_msg().c_str());
"%s", xde.get_msg().c_str());
} catch (...) {
throw Mu::Error(Error::Code::Internal,
"something went wrong when opening store @ %s",