mu: improve mu-error
Add specific error-code for SchemaMismatch Combine find/cfind no-matches
This commit is contained in:
@ -43,19 +43,18 @@ struct Error final : public std::exception {
|
||||
AccessDenied = ERROR_ENUM(1,0),
|
||||
AssertionFailure = ERROR_ENUM(1,0),
|
||||
Command = ERROR_ENUM(1,0),
|
||||
ContactNotFound = ERROR_ENUM(2,SoftError),
|
||||
Crypto = ERROR_ENUM(1,0),
|
||||
File = ERROR_ENUM(1,0),
|
||||
Index = ERROR_ENUM(1,0),
|
||||
Internal = ERROR_ENUM(1,0),
|
||||
InvalidArgument = ERROR_ENUM(1,0),
|
||||
Message = ERROR_ENUM(1,0),
|
||||
NoMatches = ERROR_ENUM(4,SoftError),
|
||||
NoMatches = ERROR_ENUM(2,SoftError),
|
||||
NotFound = ERROR_ENUM(1,0),
|
||||
Parsing = ERROR_ENUM(1,0),
|
||||
Play = ERROR_ENUM(1,0),
|
||||
Query = ERROR_ENUM(1,0),
|
||||
SchemaMismatch = ERROR_ENUM(1,0),
|
||||
SchemaMismatch = ERROR_ENUM(11,0),
|
||||
Script = ERROR_ENUM(1,0),
|
||||
ScriptNotFound = ERROR_ENUM(1,0),
|
||||
Store = ERROR_ENUM(1,0),
|
||||
|
||||
@ -315,7 +315,7 @@ Mu::mu_cmd_cfind(const Mu::Store& store, const Mu::Options& opts)
|
||||
});
|
||||
|
||||
if (num == 0)
|
||||
return Err(Error::Code::ContactNotFound, "no matching contacts found");
|
||||
return Err(Error::Code::NoMatches, "no matching contacts found");
|
||||
|
||||
output(ItemType::Footer, Nothing, opts);
|
||||
return Ok();
|
||||
|
||||
Reference in New Issue
Block a user