Skip to content

Commit

Permalink
xapian-db: use get_msg on exception
Browse files Browse the repository at this point in the history
We were using get_error_string, but that might be NULL,
which libfmt doesn't like much.
  • Loading branch information
djcb committed Mar 15, 2024
1 parent 3660ad9 commit 5dfb4e9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/mu-xapian-db.hh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
** Copyright (C) 2023 Dirk-Jan C. Binnema <[email protected]>
** Copyright (C) 2024 Dirk-Jan C. Binnema <[email protected]>
**
** 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
Expand Down Expand Up @@ -89,7 +89,7 @@ try {
return Err(Error{Error::Code::Xapian, "message not found in database"}.
add_hint("Try reopening the database"));
} 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) {
return Err(Error::Code::Internal, "runtime error: {}", re.what());
} catch (const std::exception& e) {
Expand Down

0 comments on commit 5dfb4e9

Please sign in to comment.