From b41955b82a5605f5869d40eefa670ad02bf3a78b Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Tue, 11 Apr 2023 21:31:13 +0300 Subject: [PATCH] mu-server: improve error message --- lib/mu-server.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/mu-server.cc b/lib/mu-server.cc index 58f2bcb0..1cccc255 100644 --- a/lib/mu-server.cc +++ b/lib/mu-server.cc @@ -904,16 +904,16 @@ Server::Private::move_handler(const Command& cmd) if (docids.size() > 1) { if (!maildir.empty()) // ie. duplicate message-ids. throw Mu::Error{Error::Code::Store, - "can't move multiple messages at the same time"}; + "cannot move multiple messages at the same time"}; // multi. for (auto&& docid : docids) move_docid(docid, flagopt, rename, no_view); return; } - auto docid{docids.at(0)}; + const auto docid{docids.at(0)}; auto msg = store().find_message(docid) - .or_else([]{throw Error{Error::Code::InvalidArgument, - "could not create message"};}).value(); + .or_else([&]{throw Error{Error::Code::InvalidArgument, + "cannot find message %u", docid};}).value(); /* if maildir was not specified, take the current one */ if (maildir.empty())