Made the error message from connect() a little more informative.

This commit is contained in:
Davis King 2012-10-11 23:22:38 -04:00
parent a1daeea4a4
commit aa2304585e

View File

@ -36,7 +36,11 @@ namespace dlib
}
if(create_connection(con,port,ip))
throw socket_error("unable to connect to '" + host_or_ip + "'");
{
std::ostringstream sout;
sout << "unable to connect to '" << host_or_ip << ":" << port << "'";
throw socket_error(sout.str());
}
return con;
}