diff --git a/src/main/java/duke/Duke.java b/src/main/java/duke/Duke.java index e4824573c8..b58e2c007a 100644 --- a/src/main/java/duke/Duke.java +++ b/src/main/java/duke/Duke.java @@ -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(); }