add error code to TimeoutException, where available

This commit is contained in:
Guenter Obiltschnig
2013-12-13 12:34:42 +01:00
parent 612f149430
commit 8b456cd293

View File

@@ -324,7 +324,7 @@ int SocketImpl::receiveBytes(void* buffer, int length, int flags)
if (err == POCO_EAGAIN && !_blocking)
;
else if (err == POCO_EAGAIN || err == POCO_ETIMEDOUT)
throw TimeoutException();
throw TimeoutException(err);
else
error(err);
}
@@ -380,7 +380,7 @@ int SocketImpl::receiveFrom(void* buffer, int length, SocketAddress& address, in
if (err == POCO_EAGAIN && !_blocking)
;
else if (err == POCO_EAGAIN || err == POCO_ETIMEDOUT)
throw TimeoutException();
throw TimeoutException(err);
else
error(err);
}