@@ -64,50 +64,27 @@ DashboardClient::DashboardClient(const std::string& host, const ClientPolicy cli
6464
6565bool DashboardClient::connect (const size_t max_num_tries, const std::chrono::milliseconds reconnection_time)
6666{
67- if (impl_ == nullptr )
68- {
69- throw UrException (" DashboardClient::connect called, but impl_ is nullptr. This should not happen." );
70- }
7167 bool success = impl_->connect (max_num_tries, reconnection_time);
7268 return success;
7369}
7470
7571void DashboardClient::disconnect ()
7672{
77- if (impl_)
78- {
79- impl_->disconnect ();
80- }
81- else
82- {
83- throw UrException (" DashboardClient::disconnect called, but impl_ is nullptr. This should not happen." );
84- }
73+ impl_->disconnect ();
8574}
8675
8776std::string DashboardClient::sendAndReceive (const std::string& text)
8877{
89- if (impl_ == nullptr )
90- {
91- throw UrException (" DashboardClient::sendAndReceive called, but impl_ is nullptr. This should not happen." );
92- }
9378 return impl_->sendAndReceive (text);
9479}
9580
9681bool DashboardClient::sendRequest (const std::string& command, const std::string& expected)
9782{
98- if (impl_ == nullptr )
99- {
100- throw UrException (" DashboardClient::sendAndReceive called, but impl_ is nullptr. This should not happen." );
101- }
10283 return impl_->sendRequest (command, expected);
10384}
10485
10586std::string DashboardClient::sendRequestString (const std::string& command, const std::string& expected)
10687{
107- if (impl_ == nullptr )
108- {
109- throw UrException (" DashboardClient::sendRequestString called, but impl_ is nullptr. This should not happen." );
110- }
11188 return impl_->sendRequestString (command, expected);
11289}
11390
@@ -588,20 +565,11 @@ void DashboardClient::assertVersion(const std::string& e_series_min_ver, const s
588565
589566timeval DashboardClient::getConfiguredReceiveTimeout () const
590567{
591- if (impl_ == nullptr )
592- {
593- throw UrException (" DashboardClient::getConfiguredReceiveTimeout called, but impl_ is nullptr. This should not "
594- " happen." );
595- }
596568 return impl_->getConfiguredReceiveTimeout ();
597569}
598570
599571void DashboardClient::setReceiveTimeout (const timeval& timeout)
600572{
601- if (impl_ == nullptr )
602- {
603- throw UrException (" DashboardClient::setReceiveTimeout called, but impl_ is nullptr. This should not happen." );
604- }
605573 impl_->setReceiveTimeout (timeout);
606574}
607575} // namespace urcl
0 commit comments