Commit 433436b48b6eb482b946e8a0cb66b27a22579ce0

Authored by Perry Werneck
1 parent 4a57beb0
Exists in master and in 1 other branch develop

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 51 .call()
52 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 58 void IPC::Session::set(int baddr, const std::string &str) {
61 59  
62   - int rc;
  60 + int32_t rc;
63 61  
64 62 Request(*this,"setStringAtAddress")
65 63 .push((int32_t) baddr)
... ... @@ -67,9 +65,8 @@
67 65 .call()
68 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 81 .call()
85 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  
... ...