Skip to content

Commit

Permalink
Edit error message when tasks.txt file is not found
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonRay168 committed Sep 22, 2023
1 parent 8bc161a commit fc71437
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/echobot/utilities/Storage.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public void overwriteTasksData(ArrayList<Task> tasks) {
oos.flush();
oos.close();
} catch (IOException e) {
AlertBox alert = new AlertBox("IOException", "File not found or corrupted (overwriteTasksData() method)");
AlertBox alert = new AlertBox("File not found or corrupted", "Please try to restart the app");
alert.show();
}
}
Expand All @@ -65,10 +65,10 @@ public ArrayList<Task> loadTasksData() {
tasks = (ArrayList<Task>) ois.readObject();
ois.close();
} catch (IOException e) {
AlertBox alert = new AlertBox("IOException", "File not found or corrupted (loadTasksData method)");
AlertBox alert = new AlertBox("File not found or corrupted", "Please try to restart the app");
alert.show();
} catch (ClassNotFoundException e) {
AlertBox alert = new AlertBox("ClassNotFoundException", "Class is not found");
AlertBox alert = new AlertBox("ClassNotFoundException", "Class is not found, please restart the app");
alert.show();
}
return tasks;
Expand Down

0 comments on commit fc71437

Please sign in to comment.