From 56b3460aa318b650f12833ba119fa6decb930148 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Tue, 10 Sep 2024 16:57:24 +0200 Subject: Consistently use SocketException for socket errors The behaviour is not consistent as Windows doesn't use errno for socket errors, but Unix systems do. Always use the same exception to keep things somewhat sane. --- common/rdr/FdOutStream.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'common/rdr/FdOutStream.cxx') diff --git a/common/rdr/FdOutStream.cxx b/common/rdr/FdOutStream.cxx index 1f60d45b..1b6049ca 100644 --- a/common/rdr/FdOutStream.cxx +++ b/common/rdr/FdOutStream.cxx @@ -117,7 +117,7 @@ size_t FdOutStream::writeFd(const uint8_t* data, size_t length) } while (n < 0 && errorNumber == EINTR); if (n < 0) - throw SystemException("select", errorNumber); + throw SocketException("select", errorNumber); if (n == 0) return 0; @@ -134,7 +134,7 @@ size_t FdOutStream::writeFd(const uint8_t* data, size_t length) } while (n < 0 && (errorNumber == EINTR)); if (n < 0) - throw SystemException("write", errorNumber); + throw SocketException("write", errorNumber); gettimeofday(&lastWrite, nullptr); -- cgit v1.2.3