diff options
author | 2016-02-01 03:45:44 -0500 | |
---|---|---|
committer | 2016-02-01 03:47:29 -0500 | |
commit | f9dcbd38e90601f5571bb5bcfb67170876ecd3c6 (patch) | |
tree | 4a6eb47e4a1a528e3df2c866c717b6cfad5d41c3 /src/sim | |
parent | 696cbfb3616a506cca7e7c68c1b92ff037f54f87 (diff) |
simulator support (API and profiles)
Diffstat (limited to 'src/sim')
-rw-r--r-- | src/sim/trex_sim_stateless.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/sim/trex_sim_stateless.cpp b/src/sim/trex_sim_stateless.cpp index 13f264cf..46b9916f 100644 --- a/src/sim/trex_sim_stateless.cpp +++ b/src/sim/trex_sim_stateless.cpp @@ -268,12 +268,16 @@ SimStateless::prepare_dataplane() { void SimStateless::execute_json(const std::string &json_filename) { - + std::string rep; std::ifstream test(json_filename); std::stringstream buffer; buffer << test.rdbuf(); - std::string rep = m_trex_stateless->get_rpc_server()->test_inject_request(buffer.str()); + try { + rep = m_trex_stateless->get_rpc_server()->test_inject_request(buffer.str()); + } catch (TrexRpcException &e) { + throw SimRunException(e.what()); + } Json::Value root; Json::Reader reader; |