Skip to content

Commit

Permalink
[continued] Show more info in exception messages. close #7
Browse files Browse the repository at this point in the history
  • Loading branch information
Dung Viet Nguyen committed Jul 24, 2016
1 parent a1718a0 commit 28f51b6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ void Client::connectToHost()
}
catch (const net::Exception& ex)
{
cout << ex.what();
throw http::Exception("Can't connect to server");
throw http::Exception("Can't connect to server\n [net]: " + string(ex.what()));
}
}

Expand Down Expand Up @@ -113,7 +112,7 @@ Response Client::getResponse(const string &request){
}
catch (const net::Exception& ex)
{
throw http::Exception("Couldn't receive response from server");
throw http::Exception("Couldn't receive response from server\n [net]:" + string(ex.what()));
}
}

Expand Down

0 comments on commit 28f51b6

Please sign in to comment.