Return a more informative error for invalid verbose filters

This commit is contained in:
Luck 2018-11-06 13:16:07 +00:00
parent 9988011308
commit f63992e209
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B
2 changed files with 2 additions and 3 deletions

View File

@ -79,8 +79,7 @@ public class VerboseCommand extends SingleCommand {
try {
parsedFilter = VerboseFilter.parse(filter);
} catch (InvalidFilterException e) {
e.printStackTrace();
Message.VERBOSE_INVALID_FILTER.send(sender, filter);
Message.VERBOSE_INVALID_FILTER.send(sender, filter, e.getCause().getMessage());
return CommandResult.FAILURE;
}

View File

@ -128,7 +128,7 @@ public enum Message {
/*
* Commands
*/
VERBOSE_INVALID_FILTER("&4{}&c is not a valid verbose filter.", true),
VERBOSE_INVALID_FILTER("&4{}&c is not a valid verbose filter. &7({})", true),
VERBOSE_ON("&bVerbose logging &aenabled &bfor checks matching &aANY&b.", true),
VERBOSE_ON_QUERY("&bVerbose logging &aenabled &bfor checks matching &a{}&b.", true),
VERBOSE_OFF("&bVerbose logging &cdisabled&b.", true),