Changed: Use toString for formatting

This commit is contained in:
kervala 2016-04-02 13:30:08 +02:00
parent e2073f31d7
commit 4e62ef6921

View file

@ -721,7 +721,7 @@ std::vector<CInetAddress> CInetAddress::localAddresses()
if (status)
{
// will come here if the local hostname (/etc/hostname in Linux) is not the real name
throw ESocket( (string("Hostname resolution failed for ")+string(localhost)).c_str() );
throw ESocket( toString("Hostname resolution failed for %s", localhost).c_str() );
}
struct addrinfo *p = res;
@ -767,7 +767,7 @@ std::vector<CInetAddress> CInetAddress::localAddresses()
if(vect.empty())
{
throw ESocket( (string("No network card detected for ")+string(localhost)).c_str() );
throw ESocket(toString("No network card detected for %s", localhost).c_str() );
}
return vect;