mu: improve error reporting
This commit is contained in:
@ -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",
|
||||
|
||||
@ -150,7 +150,7 @@ struct Error final : public std::exception {
|
||||
}
|
||||
|
||||
constexpr uint8_t exit_code() const {
|
||||
return ((static_cast<uint32_t>(code_) >> 15) & 0xf);
|
||||
return ((static_cast<uint32_t>(code_) >> 15) & 0xff);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user