From 5dfb4e9dd6716d63ceda565c115792f23256ab6d Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Fri, 15 Mar 2024 22:44:32 +0200 Subject: [PATCH] xapian-db: use get_msg on exception We were using get_error_string, but that might be NULL, which libfmt doesn't like much. --- lib/mu-xapian-db.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/mu-xapian-db.hh b/lib/mu-xapian-db.hh index c0d58653..1c46bddb 100644 --- a/lib/mu-xapian-db.hh +++ b/lib/mu-xapian-db.hh @@ -1,5 +1,5 @@ /* -** Copyright (C) 2023 Dirk-Jan C. Binnema +** Copyright (C) 2024 Dirk-Jan C. Binnema ** ** 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 @@ -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) {