From 6e01d27cccf15c4266f25315b3c6a26270932a01 Mon Sep 17 00:00:00 2001 From: Nikollai Date: Mon, 18 May 2026 18:23:13 +0200 Subject: [PATCH] Added logging for exceptions in App.java --- src/main/java/millions/App.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/millions/App.java b/src/main/java/millions/App.java index 89fa403..cb1b7d2 100644 --- a/src/main/java/millions/App.java +++ b/src/main/java/millions/App.java @@ -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"); @@ -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); } });