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
|
@Override
|
||||||
public void start(Stage primaryStage) throws Exception {
|
public void start(Stage primaryStage) throws Exception {
|
||||||
|
try {
|
||||||
Parent root = FXMLLoader.load(getClass().getResource("MainView.fxml"));
|
Parent root = FXMLLoader.load(getClass().getResource("MainView.fxml"));
|
||||||
primaryStage.setTitle("Numbers Station");
|
primaryStage.setTitle("Numbers Station");
|
||||||
primaryStage.setScene(new Scene(root));
|
primaryStage.setScene(new Scene(root));
|
||||||
primaryStage.show();
|
primaryStage.show();
|
||||||
logger.info("Application started");
|
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() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user