mirror of https://github.com/djcb/mu.git
mu-server: improve error message
This commit is contained in:
parent
8762ac27dc
commit
b41955b82a
|
@ -904,16 +904,16 @@ Server::Private::move_handler(const Command& cmd)
|
||||||
if (docids.size() > 1) {
|
if (docids.size() > 1) {
|
||||||
if (!maildir.empty()) // ie. duplicate message-ids.
|
if (!maildir.empty()) // ie. duplicate message-ids.
|
||||||
throw Mu::Error{Error::Code::Store,
|
throw Mu::Error{Error::Code::Store,
|
||||||
"can't move multiple messages at the same time"};
|
"cannot move multiple messages at the same time"};
|
||||||
// multi.
|
// multi.
|
||||||
for (auto&& docid : docids)
|
for (auto&& docid : docids)
|
||||||
move_docid(docid, flagopt, rename, no_view);
|
move_docid(docid, flagopt, rename, no_view);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
auto docid{docids.at(0)};
|
const auto docid{docids.at(0)};
|
||||||
auto msg = store().find_message(docid)
|
auto msg = store().find_message(docid)
|
||||||
.or_else([]{throw Error{Error::Code::InvalidArgument,
|
.or_else([&]{throw Error{Error::Code::InvalidArgument,
|
||||||
"could not create message"};}).value();
|
"cannot find message %u", docid};}).value();
|
||||||
|
|
||||||
/* if maildir was not specified, take the current one */
|
/* if maildir was not specified, take the current one */
|
||||||
if (maildir.empty())
|
if (maildir.empty())
|
||||||
|
|
Loading…
Reference in New Issue