Add catch for exception in start()

This commit is contained in:
Nathan McRae 2025-02-01 12:29:28 -08:00
parent f7314290db
commit abac552971

View File

@ -39,11 +39,15 @@ public class Main extends Application {
@Override @Override
public void start(Stage primaryStage) throws Exception { public void start(Stage primaryStage) throws Exception {
Parent root = FXMLLoader.load(getClass().getResource("MainView.fxml")); try {
primaryStage.setTitle("Numbers Station"); Parent root = FXMLLoader.load(getClass().getResource("MainView.fxml"));
primaryStage.setScene(new Scene(root)); primaryStage.setTitle("Numbers Station");
primaryStage.show(); primaryStage.setScene(new Scene(root));
logger.info("Application started"); primaryStage.show();
logger.info("Application started");
} catch (IOException e) {
logger.log(Level.SEVERE, "Failed to load main view", e);
}
} }
private static void setupLogger() { private static void setupLogger() {