mirror of https://github.com/djcb/mu.git
xapian-db: use get_msg on exception
We were using get_error_string, but that might be NULL, which libfmt doesn't like much.
This commit is contained in:
parent
3660ad9ed7
commit
5dfb4e9dd6
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
** Copyright (C) 2023 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
|
** Copyright (C) 2024 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
|
||||||
**
|
**
|
||||||
** This program is free software; you can redistribute it and/or modify it
|
** This program is free software; you can redistribute it and/or modify it
|
||||||
** under the terms of the GNU General Public License as published by the
|
** under the terms of the GNU General Public License as published by the
|
||||||
|
@ -89,7 +89,7 @@ try {
|
||||||
return Err(Error{Error::Code::Xapian, "message not found in database"}.
|
return Err(Error{Error::Code::Xapian, "message not found in database"}.
|
||||||
add_hint("Try reopening the database"));
|
add_hint("Try reopening the database"));
|
||||||
} catch (const Xapian::Error& xerr) {
|
} catch (const Xapian::Error& xerr) {
|
||||||
return Err(Error::Code::Xapian, "{}", xerr.get_error_string());
|
return Err(Error::Code::Xapian, "{}", xerr.get_msg());
|
||||||
} catch (const std::runtime_error& re) {
|
} catch (const std::runtime_error& re) {
|
||||||
return Err(Error::Code::Internal, "runtime error: {}", re.what());
|
return Err(Error::Code::Internal, "runtime error: {}", re.what());
|
||||||
} catch (const std::exception& e) {
|
} catch (const std::exception& e) {
|
||||||
|
|
Loading…
Reference in New Issue