Skip to content

Commit ef14606

Browse files
committed
Improve literal command parse error reason
1 parent bf10049 commit ef14606

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bluecommands-core/src/main/java/de/bluecolored/bluecommands/LiteralCommand.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ void parse(ParseData<C, T> data) {
5252
data.getResult().addFailure(new ParseFailure<>(
5353
data.getCurrentSegment().getPosition(),
5454
match == null ?
55-
String.format("Expected '%s', but got something else.", literal) :
56-
String.format("Expected '%s', but got '%s'.", literal, match.group()),
55+
"Unknown or incomplete command." :
56+
String.format("Unknown or incomplete command, got '%s' but expected something else.", match.group()),
5757
data.getCommandStack(),
5858
Collections.singletonList(new SimpleSuggestion(literal))
5959
));

0 commit comments

Comments
 (0)