diff options
author | 2016-07-03 10:55:49 +0300 | |
---|---|---|
committer | 2016-07-03 13:40:23 +0300 | |
commit | c6c4a4307a8a0ae17d3e26c9dc98b874dd5ee60b (patch) | |
tree | c32a0f0c6465b63e9857d19313ed13651cfd934a /src/sim | |
parent | ed196079a710ddc30552ecbc0329db7a75a4ca60 (diff) |
client config - cosmetics and gtest back on
Diffstat (limited to 'src/sim')
-rw-r--r-- | src/sim/trex_sim_stateful.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/sim/trex_sim_stateful.cpp b/src/sim/trex_sim_stateful.cpp index 03538e58..7546644d 100644 --- a/src/sim/trex_sim_stateful.cpp +++ b/src/sim/trex_sim_stateful.cpp @@ -167,7 +167,12 @@ int load_list_of_cap_files(CParserOption * op){ fl.load_from_yaml(op->cfg_file,1); if (op->client_cfg_file != "") { - fl.load_client_config_file(op->client_cfg_file); + try { + fl.load_client_config_file(op->client_cfg_file); + } catch (const std::runtime_error &e) { + std::cout << "\n*** " << e.what() << "\n\n"; + exit(-1); + } CGlobalInfo::m_options.preview.set_client_cfg_enable(true); } @@ -609,5 +614,10 @@ int merge_2_cap_files_sip() { int SimStateful::run() { assert( CMsgIns::Ins()->Create(4) ); - return load_list_of_cap_files(&CGlobalInfo::m_options); + try { + return load_list_of_cap_files(&CGlobalInfo::m_options); + } catch (const std::runtime_error &e) { + std::cout << "\n*** " << e.what() << "\n\n"; + exit(-1); + } } |