Skip to content

Commit

Permalink
Address exception saving movie preferences
Browse files Browse the repository at this point in the history
  • Loading branch information
cjmyers committed Oct 9, 2022
1 parent f74c41a commit 040aa01
Showing 1 changed file with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -819,9 +819,18 @@ private void removeJPGs() {
public void savePreferences() {

Gson gson = new Gson();
String out = gson.toJson(this.movieScheme.getAllSpeciesSchemes());
String out;
String fullPath;

String fullPath = getPreferencesFullPath();
try {
out = gson.toJson(this.movieScheme.getAllSpeciesSchemes());
fullPath = getPreferencesFullPath();
}
catch (Exception e) {
e.printStackTrace();
JOptionPane.showMessageDialog(Gui.frame, "An error occured preparing to save movie preferences " + "\nmessage: " + e.getMessage());
return;
}

FileOutputStream fHandle;

Expand Down

0 comments on commit 040aa01

Please sign in to comment.