summaryrefslogtreecommitdiff
path: root/lib/server/SocketStream.cpp
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2014-08-15 22:47:17 +0000
committerChris Wilson <chris+github@qwirx.com>2014-08-15 22:47:17 +0000
commit28f181cc204298272ed96b87e80866075a5a0d57 (patch)
tree9da18bf86956364150fbcbadd207917f93c2cf3f /lib/server/SocketStream.cpp
parent732370e12192a3b66a8b0a3e1f66eed3ebcdc3d3 (diff)
Remove ServerException.h and the exception code aliases that it defines.
We don't really need these, so clean up by removing them.
Diffstat (limited to 'lib/server/SocketStream.cpp')
-rw-r--r--lib/server/SocketStream.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/server/SocketStream.cpp b/lib/server/SocketStream.cpp
index f0bfcf94..7b46b024 100644
--- a/lib/server/SocketStream.cpp
+++ b/lib/server/SocketStream.cpp
@@ -29,8 +29,9 @@
#include <bsd/unistd.h>
#endif
+#include "autogen_ConnectionException.h"
+#include "autogen_ServerException.h"
#include "SocketStream.h"
-#include "ServerException.h"
#include "CommonException.h"
#include "Socket.h"
@@ -184,7 +185,7 @@ void SocketStream::Open(Socket::Type Type, const std::string& rName, int Port)
#endif // WIN32
mSocketHandle = INVALID_SOCKET_VALUE;
- THROW_EXCEPTION(ConnectionException, Conn_SocketConnectError)
+ THROW_EXCEPTION(ConnectionException, SocketConnectError)
}
ResetCounters();
@@ -260,7 +261,7 @@ int SocketStream::Read(void *pBuffer, int NBytes, int Timeout)
// Other error
BOX_LOG_SYS_ERROR("Failed to read from socket");
THROW_EXCEPTION(ConnectionException,
- Conn_SocketReadError);
+ SocketReadError);
}
}
@@ -310,7 +311,7 @@ void SocketStream::Write(const void *pBuffer, int NBytes)
mWriteClosed = true; // assume can't write again
BOX_LOG_SYS_ERROR("Failed to write to socket");
THROW_EXCEPTION(ConnectionException,
- Conn_SocketWriteError);
+ SocketWriteError);
}
// Knock off bytes sent
@@ -401,7 +402,7 @@ void SocketStream::Shutdown(bool Read, bool Write)
if(::shutdown(mSocketHandle, how) == -1)
{
BOX_LOG_SYS_ERROR("Failed to shutdown socket");
- THROW_EXCEPTION(ConnectionException, Conn_SocketShutdownError)
+ THROW_EXCEPTION(ConnectionException, SocketShutdownError)
}
}