provide end-user hints and show them
Only a few for now.
This commit is contained in:
@ -77,7 +77,8 @@ xapian_try_result(Func&& func) noexcept -> std::decay_t<decltype(func())>
|
||||
try {
|
||||
return func();
|
||||
} catch (const Xapian::DatabaseLockError& dlerr) {
|
||||
return Err(Error::Code::StoreLock, "database locked");
|
||||
return Err(Error{Error::Code::StoreLock, "database locked"}.
|
||||
add_hint("Perhaps mu is already running?"));
|
||||
} catch (const Xapian::Error& xerr) {
|
||||
return Err(Error::Code::Xapian, "{}", xerr.get_error_string());
|
||||
} catch (const std::runtime_error& re) {
|
||||
|
||||
Reference in New Issue
Block a user