Commit 433436b48b6eb482b946e8a0cb66b27a22579ce0
1 parent
4a57beb0
Exists in
master
and in
1 other branch
Fixing test of return codes in remote requests.
Showing
1 changed file
with
6 additions
and
10 deletions
Show diff stats
client/src/session/remote/set.cc
@@ -51,15 +51,13 @@ | @@ -51,15 +51,13 @@ | ||
51 | .call() | 51 | .call() |
52 | .pop(rc); | 52 | .pop(rc); |
53 | 53 | ||
54 | - if(rc) { | ||
55 | - throw std::system_error((int) rc, std::system_category()); | ||
56 | - } | 54 | + chkResponse(rc); |
57 | 55 | ||
58 | } | 56 | } |
59 | 57 | ||
60 | void IPC::Session::set(int baddr, const std::string &str) { | 58 | void IPC::Session::set(int baddr, const std::string &str) { |
61 | 59 | ||
62 | - int rc; | 60 | + int32_t rc; |
63 | 61 | ||
64 | Request(*this,"setStringAtAddress") | 62 | Request(*this,"setStringAtAddress") |
65 | .push((int32_t) baddr) | 63 | .push((int32_t) baddr) |
@@ -67,9 +65,8 @@ | @@ -67,9 +65,8 @@ | ||
67 | .call() | 65 | .call() |
68 | .pop(rc); | 66 | .pop(rc); |
69 | 67 | ||
70 | - if(rc) { | ||
71 | - throw std::system_error((int) rc, std::system_category()); | ||
72 | - } | 68 | + if(rc < 0) |
69 | + chkResponse(-rc); | ||
73 | 70 | ||
74 | } | 71 | } |
75 | 72 | ||
@@ -84,9 +81,8 @@ | @@ -84,9 +81,8 @@ | ||
84 | .call() | 81 | .call() |
85 | .pop(rc); | 82 | .pop(rc); |
86 | 83 | ||
87 | - if(rc) { | ||
88 | - throw std::system_error((int) rc, std::system_category()); | ||
89 | - } | 84 | + if(rc < 0) |
85 | + chkResponse(-rc); | ||
90 | 86 | ||
91 | } | 87 | } |
92 | 88 |