Skip to content

Commit

Permalink
SocketStream: use THROW_SOCKET_ERROR for better messages on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
qris committed Nov 8, 2017
1 parent 25e7952 commit 69edaa6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/server/SocketStream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,7 @@ int SocketStream::Read(void *pBuffer, int NBytes, int Timeout)
else
{
// Other error
BOX_LOG_SYS_ERROR("Failed to read from socket");
THROW_EXCEPTION(ConnectionException,
THROW_SOCKET_ERROR("Failed to read from socket", ConnectionException,
SocketReadError);
}
}
Expand Down Expand Up @@ -394,7 +393,7 @@ void SocketStream::Write(const void *pBuffer, int NBytes, int Timeout)
{
// Error.
mWriteClosed = true; // assume can't write again
THROW_SYS_ERROR("Failed to write to socket",
THROW_SOCKET_ERROR("Failed to write to socket",
ConnectionException, SocketWriteError);
}

Expand Down

0 comments on commit 69edaa6

Please sign in to comment.