summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeny Zinoviev <me@ch1p.io>2021-05-22 16:08:53 +0300
committerEvgeny Zinoviev <me@ch1p.io>2021-05-22 16:08:53 +0300
commit7792842ae3b931f50d00340ed2599b9cbf35d647 (patch)
treeb0fc2e32fffde679d3a114ac126fc51c374f1d43
parent45e97872e30ade84ccde4039625e5fa758a3cf7d (diff)
p18::Client::execute: don't catch InvalidResponseError
-rw-r--r--src/p18/client.cc11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/p18/client.cc b/src/p18/client.cc
index 9baae1a..3963b64 100644
--- a/src/p18/client.cc
+++ b/src/p18/client.cc
@@ -105,15 +105,10 @@ std::shared_ptr<response_type::BaseResponse> Client::execute(p18::CommandType co
break;
}
- try {
- if (!response->validate())
- throw InvalidResponseError("validate() failed");
-
- response->unpack();
- } catch (InvalidResponseError& e) {
- return std::make_unique<response_type::ErrorResponse>(e.what());
- }
+ if (!response->validate())
+ throw InvalidResponseError("validate() failed");
+ response->unpack();
return std::move(response);
}