Skip to content

Commit

Permalink
Added logging for exceptions in App.java
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikollai committed May 18, 2026
1 parent c717175 commit 6e01d27
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/millions/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public void start(Stage stage) {
Scene gameScene = new Scene(gameView, 1920, 1080);
stage.setScene(gameScene);
} catch (InvalidFormatException e) {
logger.log(Level.FINE, "Invalid format", e);
logger.log(Level.WARNING, "InvalidFormatException: " + e.getMessage());
Alert alert = new Alert(Alert.AlertType.ERROR);
alert.setTitle("Error");
alert.setHeaderText("Error with selected file");
Expand All @@ -49,7 +49,7 @@ public void start(Stage stage) {
alert.showAndWait();

} catch (RuntimeException ex) {
logger.log(Level.SEVERE, "Runtime error", ex);
logger.log(Level.SEVERE, ex.getMessage());
System.exit(0);
}
});
Expand Down

0 comments on commit 6e01d27

Please sign in to comment.