aboutsummaryrefslogtreecommitdiffstats
path: root/common/rdr/FdOutStream.cxx
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2024-09-10 16:57:24 +0200
committerPierre Ossman <ossman@cendio.se>2024-10-09 13:37:08 +0200
commit56b3460aa318b650f12833ba119fa6decb930148 (patch)
tree5f0e4dea4d3b4130b63179a86cf2a4257cf3a33a /common/rdr/FdOutStream.cxx
parent6029d50080bb795524d6cefe8d6b4b9b88475bdd (diff)
downloadtigervnc-56b3460aa318b650f12833ba119fa6decb930148.tar.gz
tigervnc-56b3460aa318b650f12833ba119fa6decb930148.zip
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.
Diffstat (limited to 'common/rdr/FdOutStream.cxx')
-rw-r--r--common/rdr/FdOutStream.cxx4
1 files changed, 2 insertions, 2 deletions
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);