p18::Client::execute: don't catch InvalidResponseError
This commit is contained in:
parent
45e97872e3
commit
7792842ae3
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user