Skip to content

Commit

Permalink
Throw when Connection::Curl not connected
Browse files Browse the repository at this point in the history
  • Loading branch information
not7cd committed Mar 29, 2019
1 parent 6f57335 commit e5f3876
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion indi-starbook/connectioncurl.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@ namespace Connection {

void setDefaultPort(uint32_t addressPort);

CURL *getHandle() const { return handle; }
CURL *getHandle() const {
if (handle == nullptr) throw std::runtime_error("connection error, no handle");
return handle;
}

protected:
ITextVectorProperty AddressTP;
Expand Down

0 comments on commit e5f3876

Please sign in to comment.