From: Augustin Degomme Date: Wed, 29 Dec 2021 15:24:35 +0000 (+0100) Subject: replay: add an explicit message if an action is not found in the replay engine X-Git-Tag: v3.30~155 X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/a387a0d33b07975e8867914172ba270272e8961b replay: add an explicit message if an action is not found in the replay engine --- diff --git a/src/xbt/xbt_replay.cpp b/src/xbt/xbt_replay.cpp index 9635ca861a..391522101c 100644 --- a/src/xbt/xbt_replay.cpp +++ b/src/xbt/xbt_replay.cpp @@ -99,7 +99,12 @@ static ReplayAction* get_action(const char* name) static void handle_action(ReplayAction& action) { XBT_DEBUG("%s replays a %s action", action.at(0).c_str(), action.at(1).c_str()); - action_fun function = action_funs.at(action.at(1)); + action_fun function; + try { + function = action_funs.at(action.at(1)); + } catch (const std::out_of_range&) { + xbt_die("Replay Error: action %s is unknown, please register it properly in the replay engine", action.at(1).c_str()); + } try { function(action); } catch (const Exception&) {