diff options
Diffstat (limited to 'src/p18/client.cc')
-rw-r--r-- | src/p18/client.cc | 11 |
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); } |