mirror of
https://github.com/davisking/dlib.git
synced 2024-11-01 10:14:53 +08:00
Made the error message from connect() a little more informative.
This commit is contained in:
parent
a1daeea4a4
commit
aa2304585e
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user