mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-26 06:22:48 -04:00
unified handling of runtime exceptions
This commit is contained in:
parent
de4f1cbfb8
commit
228e990557
@ -93,8 +93,8 @@ public class RealTimeClock implements ModelStateObserver {
|
||||
output.setValue(1 - output.getValue());
|
||||
model.doStep();
|
||||
});
|
||||
} catch (NodeException e1) {
|
||||
stopper.showErrorAndStopModel(Lang.get("msg_clockError"), e1);
|
||||
} catch (NodeException | RuntimeException e) {
|
||||
stopper.showErrorAndStopModel(Lang.get("msg_clockError"), e);
|
||||
timer.cancel(false);
|
||||
}
|
||||
}
|
||||
@ -128,8 +128,8 @@ public class RealTimeClock implements ModelStateObserver {
|
||||
});
|
||||
counter++;
|
||||
}
|
||||
} catch (Exception e1) {
|
||||
stopper.showErrorAndStopModel(Lang.get("msg_clockError"), e1);
|
||||
} catch (NodeException | RuntimeException e) {
|
||||
stopper.showErrorAndStopModel(Lang.get("msg_clockError"), e);
|
||||
}
|
||||
time = System.currentTimeMillis() - time;
|
||||
|
||||
|
@ -676,7 +676,7 @@ public class Main extends JFrame implements ClosingWindowListener.ConfirmSave, E
|
||||
windowPosManager.register("testresult", new TestResultDialog(Main.this, tsl, circuitComponent.getCircuit(), library)).setVisible(true);
|
||||
|
||||
stoppedState.enter();
|
||||
} catch (Exception e1) {
|
||||
} catch (NodeException | ElementNotFoundException | PinException | TestingDataException | RuntimeException e1) {
|
||||
showErrorAndStopModel(Lang.get("msg_runningTestError"), e1);
|
||||
}
|
||||
}
|
||||
@ -697,7 +697,7 @@ public class Main extends JFrame implements ClosingWindowListener.ConfirmSave, E
|
||||
new TableDialog(Main.this, new ModelAnalyser(model).analyse(), shapeFactory, filename)
|
||||
.setVisible(true);
|
||||
stoppedState.enter();
|
||||
} catch (PinException | NodeException | AnalyseException | ElementNotFoundException e1) {
|
||||
} catch (PinException | NodeException | AnalyseException | ElementNotFoundException | RuntimeException e1) {
|
||||
showErrorAndStopModel(Lang.get("msg_annalyseErr"), e1);
|
||||
}
|
||||
}
|
||||
@ -741,8 +741,8 @@ public class Main extends JFrame implements ClosingWindowListener.ConfirmSave, E
|
||||
.showDialog()) {
|
||||
circuitComponent.getCircuit().setMeasurementOrdering(names);
|
||||
}
|
||||
} catch (Exception e1) {
|
||||
showErrorAndStopModel(Lang.get("msg_errorCreatingModel"), e1);
|
||||
} catch (NodeException | PinException | ElementNotFoundException | RuntimeException e) {
|
||||
showErrorAndStopModel(Lang.get("msg_errorCreatingModel"), e);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1122,7 +1122,7 @@ public class Main extends JFrame implements ClosingWindowListener.ConfirmSave, E
|
||||
}
|
||||
circuitComponent.hasChanged();
|
||||
addressPicker.getProgRomAddr(model);
|
||||
} catch (NodeException e) {
|
||||
} catch (NodeException | RuntimeException e) {
|
||||
showErrorAndStopModel(Lang.get("err_remoteExecution"), e);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user