Skip to content

Commit 5bfcae6

Browse files
committed
Error handling improved.
1 parent 4b18cfa commit 5bfcae6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

aima-gui/src/main/java/aima/gui/fx/framework/SimulationPaneCtrl.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,11 @@ private void runSimulation() {
211211
setState(State.RUNNING);
212212
simMethod.run();
213213
} catch (Exception e) {
214-
setStatus("Sorry, something went wrong during simulation.");
214+
setStatus("Sorry, something went wrong during simulation: " + e.getClass().getSimpleName());
215215
e.printStackTrace();
216+
} catch (Error e) {
217+
setStatus("Sorry, something went totally wrong during simulation: " + e.getClass().getSimpleName());
218+
throw e;
216219
}
217220
setState(State.FINISHED);
218221
}

0 commit comments

Comments
 (0)