From 433436b48b6eb482b946e8a0cb66b27a22579ce0 Mon Sep 17 00:00:00 2001 From: Perry Werneck Date: Fri, 23 Aug 2019 16:40:30 -0300 Subject: [PATCH] Fixing test of return codes in remote requests. --- client/src/session/remote/set.cc | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/client/src/session/remote/set.cc b/client/src/session/remote/set.cc index ebf423f..4bf2257 100644 --- a/client/src/session/remote/set.cc +++ b/client/src/session/remote/set.cc @@ -51,15 +51,13 @@ .call() .pop(rc); - if(rc) { - throw std::system_error((int) rc, std::system_category()); - } + chkResponse(rc); } void IPC::Session::set(int baddr, const std::string &str) { - int rc; + int32_t rc; Request(*this,"setStringAtAddress") .push((int32_t) baddr) @@ -67,9 +65,8 @@ .call() .pop(rc); - if(rc) { - throw std::system_error((int) rc, std::system_category()); - } + if(rc < 0) + chkResponse(-rc); } @@ -84,9 +81,8 @@ .call() .pop(rc); - if(rc) { - throw std::system_error((int) rc, std::system_category()); - } + if(rc < 0) + chkResponse(-rc); } -- libgit2 0.21.2