summaryrefslogtreecommitdiffstats
path: root/src/sim
diff options
context:
space:
mode:
authorHanoh Haim <hhaim@cisco.com>2016-02-01 11:58:17 +0200
committerHanoh Haim <hhaim@cisco.com>2016-02-01 11:58:17 +0200
commit00d74df1d05ce2b47d37574fda8806d71841d3e9 (patch)
tree032d4457292ec4e3021a67ac5ddb90683da059ec /src/sim
parentdcacbb143335db3c6939e2d9dd87055c323e4ab3 (diff)
parentf9dcbd38e90601f5571bb5bcfb67170876ecd3c6 (diff)
Merge from origin
Diffstat (limited to 'src/sim')
-rw-r--r--src/sim/trex_sim_stateless.cpp8
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;