Skip to content

Commit b95bdd4

Browse files
committed
engine: Fix compilation error due to unused variable
1 parent 806b8ea commit b95bdd4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

engine/src/simulation.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -807,7 +807,10 @@ StateId SimulationMachine::StepSimulators::impl(SimulationContext& ctx) {
807807
ctx.foreach_simulator([&ctx](cloe::Simulator& simulator) {
808808
try {
809809
cloe::Duration sim_time = simulator.process(ctx.sync);
810-
assert(sim_time == ctx.sync.time());
810+
if (sim_time != ctx.sync.time()) {
811+
812+
throw cloe::ModelError("simulator {} did not progress to required time: got {}ms, expected {}ms", simulator.name(), sim_time.count()/1'000'000, ctx.sync.time().count()/1'000'000);
813+
}
811814
} catch (cloe::ModelReset& e) {
812815
throw;
813816
} catch (cloe::ModelAbort& e) {

0 commit comments

Comments
 (0)