Add catch for exception in start()
This commit is contained in:
parent
f7314290db
commit
abac552971
@ -39,11 +39,15 @@ public class Main extends Application {
|
||||
|
||||
@Override
|
||||
public void start(Stage primaryStage) throws Exception {
|
||||
Parent root = FXMLLoader.load(getClass().getResource("MainView.fxml"));
|
||||
primaryStage.setTitle("Numbers Station");
|
||||
primaryStage.setScene(new Scene(root));
|
||||
primaryStage.show();
|
||||
logger.info("Application started");
|
||||
try {
|
||||
Parent root = FXMLLoader.load(getClass().getResource("MainView.fxml"));
|
||||
primaryStage.setTitle("Numbers Station");
|
||||
primaryStage.setScene(new Scene(root));
|
||||
primaryStage.show();
|
||||
logger.info("Application started");
|
||||
} catch (IOException e) {
|
||||
logger.log(Level.SEVERE, "Failed to load main view", e);
|
||||
}
|
||||
}
|
||||
|
||||
private static void setupLogger() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user