Skip to content

Commit ea791f4

Browse files
Franco Guidicassava
Franco Guidi
authored andcommitted
engine: Fix Cloe state machine
Fix Cloe state machine for irregular situations to go through Abort and Disconnect.
1 parent fe1882b commit ea791f4

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

engine/src/simulation.cpp

+9
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,15 @@ class SimulationMachine
199199
}
200200
} catch (cloe::AsyncAbort&) {
201201
this->push_interrupt(ABORT);
202+
} catch (cloe::ModelReset& e) {
203+
logger()->error("Unhandled reset request in {} state: {}", id, e.what());
204+
this->push_interrupt(RESET);
205+
} catch (cloe::ModelAbort& e) {
206+
logger()->error("Unhandled abort request in {} state: {}", id, e.what());
207+
this->push_interrupt(ABORT);
208+
} catch (cloe::ModelError& e) {
209+
logger()->error("Unhandled model error in {} state: {}", id, e.what());
210+
this->push_interrupt(ABORT);
202211
} catch (std::exception& e) {
203212
logger()->critical("Fatal error in {} state: {}", id, e.what());
204213
throw;

0 commit comments

Comments
 (0)