minor changes at the AsyncSequentialClock

This commit is contained in:
hneemann 2020-04-15 19:41:24 +02:00
parent a6f792406f
commit 94eb222cb0

View File

@ -30,10 +30,10 @@ public class AsyncSequentialClock implements ModelStateObserverTyped {
/**
* Creates a new real time clock
*
* @param model the model
* @param asyncSeq the infos used to cofigure the clock
* @param executor the executor used to schedule the update
* @param stopper used to stop the model if an error is detected
* @param model the model
* @param asyncSeq the data used to configure the clock
* @param executor the executor used to schedule the update
* @param stopper used to stop the model if an error is detected
*/
public AsyncSequentialClock(Model model, AsyncSeq asyncSeq, ScheduledThreadPoolExecutor executor, ErrorStopper stopper) {
this.model = model;
@ -80,6 +80,7 @@ public class AsyncSequentialClock implements ModelStateObserverTyped {
model.doMicroStep(false);
} catch (NodeException | RuntimeException e) {
stopper.showErrorAndStopModel(Lang.get("msg_clockError"), e);
} finally {
timer.cancel(false);
}
}