Updated Screen Switch to give better error logging on failed load

This commit is contained in:
law39 2020-04-29 14:07:47 +01:00
parent 9e7b691970
commit b4f63d2500

View file

@ -88,8 +88,9 @@ public class ScreenSwitch extends SharedCodeController {
}catch (IOException e){ // If an error occurs, print out error message on STDIO and crash gracefully
System.err.print("Loading the FXML file ");
System.err.print(newScene.getFXML());
System.err.println("Failed!");
System.err.println(" Failed!");
System.err.println(e.toString());
e.printStackTrace(System.err);
System.exit(-1);
}
return root;