From c6c4a4307a8a0ae17d3e26c9dc98b874dd5ee60b Mon Sep 17 00:00:00 2001 From: imarom Date: Sun, 3 Jul 2016 10:55:49 +0300 Subject: client config - cosmetics and gtest back on --- src/sim/trex_sim_stateful.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'src/sim') 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); + } } -- cgit 1.2.3-korg