Skip to content

Commit

Permalink
Fix exception not thrown for invalid num of args
Browse files Browse the repository at this point in the history
  • Loading branch information
NereusWB922 committed Sep 18, 2023
1 parent 14d64dc commit 3a51309
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/corgi/parsers/CommandValidator.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ public void validateArguments(String command, Set<String> arguments)
continue;
}

isValid = false;

if (numOfArg == 0) {
isValid = false;
errorMsg.add("Missing argument " + "\"" + argument + "\" !");
} else {
errorMsg.add("Invalid number of argument " + "\"" + argument + "\" !");
Expand Down

0 comments on commit 3a51309

Please sign in to comment.