int err=::bind(handle, &sa, size);
if(err==-1)
- throw Exception(format("Unable to bind: %s", strerror(errno)));
+ throw SystemError("Unable to bind", errno);
delete local_addr;
local_addr=addr.copy();
if(errno==EAGAIN)
return 0;
else
- throw Exception(format("Writing to socket failed: %s", strerror(errno)));
+ throw SystemError("Writing to socket failed", errno);
}
return ret;
if(errno==EAGAIN)
return 0;
else
- throw Exception(format("Reading from socket failed: %s", strerror(errno)));
+ throw SystemError("Reading from socket failed", errno);
}
else if(ret==0 && !eof_flag)
{