From 7792842ae3b931f50d00340ed2599b9cbf35d647 Mon Sep 17 00:00:00 2001 From: Evgeny Zinoviev Date: Sat, 22 May 2021 16:08:53 +0300 Subject: p18::Client::execute: don't catch InvalidResponseError --- src/p18/client.cc | 11 +++-------- 1 file 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 Client::execute(p18::CommandType co break; } - try { - if (!response->validate()) - throw InvalidResponseError("validate() failed"); - - response->unpack(); - } catch (InvalidResponseError& e) { - return std::make_unique(e.what()); - } + if (!response->validate()) + throw InvalidResponseError("validate() failed"); + response->unpack(); return std::move(response); } -- cgit v1.2.3