Skip to content

Commit

Permalink
Clean up code for release
Browse files Browse the repository at this point in the history
  • Loading branch information
nubnubyas committed Sep 21, 2023
1 parent e70ca75 commit d6c0d96
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/main/java/monday/monday/parser/Parser.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ private enum Command {
EVENT,
DELETE,
FIND,
DEFAULT,
}

/**
Expand Down Expand Up @@ -56,7 +55,8 @@ public String parseCommands(String userInput) throws MondayException {
try {
commandEnum = Command.valueOf(command.toUpperCase());
} catch (IllegalArgumentException e) {
commandEnum = Command.DEFAULT;
throw new MondayException("Sorry, I do not understand what that means.\n"
+ "Please provide a valid input/command. e.g todo read book");
}

switch (commandEnum) {
Expand All @@ -78,9 +78,6 @@ public String parseCommands(String userInput) throws MondayException {
return deleteCommand(content);
case FIND:
return findCommand(content);
case DEFAULT:
throw new MondayException("Sorry, I do not understand what that means.\n"
+ "Please provide a valid input/command. e.g todo read book");
default:
throw new MondayException("Sorry the ChatBot, please kindly wait for update.");
}
Expand Down

0 comments on commit d6c0d96

Please sign in to comment.