Skip to content

Commit

Permalink
add "update to hard disk" for delete command
Browse files Browse the repository at this point in the history
  • Loading branch information
SibingWu committed Feb 14, 2020
1 parent 3ec3c7e commit 778c368
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/java/duke/Duke.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,13 @@ public static void main(String[] args) {
case DELETE_COMMAND:
try {
deleteTask(Integer.parseInt(split[1].trim()));
updateTasksToFile(filePath, tasks);
} catch (ArrayIndexOutOfBoundsException e) {
displayEmptyDescriptionMessage(command);
} catch (NumberFormatException e) {
displayInvalidTaskNumberMessage();
} catch (IOException e) {
displayIOExceptionMessage(e);
} catch (ChatboxException e) {
displayInvalidTaskNumberMessage();
}
Expand Down

0 comments on commit 778c368

Please sign in to comment.