CircuitSim
CircuitSim copied to clipboard
Throw a slightly more friendly message when a student opens an empty file
This error gets propagated to autograders, so a more friendly error message is useful
The current behavior is this, which confuses students:
java.lang.NullPointerException: Cannot read field "circuits" because "circuitFile" is null
at com.ra4king.circuitsim.gui.CircuitSim.lambda$loadCircuits$57(CircuitSim.java:1477)
at java.base/java.lang.Thread.run(Thread.java:833)