diff options
author | Attila Molnar <attilamolnar@hush.com> | 2015-04-15 23:49:05 +0200 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2015-04-15 23:49:05 +0200 |
commit | dda1d696c1316b09d65763b4f12bc2b63cfbbe72 (patch) | |
tree | c6ca8ce29f540b1fe71b7a4f6fbadca2ca51f065 /src/inspsocket.cpp | |
parent | dad754237bf28b9cb7733f7607e128569897eb10 (diff) |
Remove exception handling from StreamSocket methods calling IOHooks
IOHooks don't throw exceptions
Diffstat (limited to 'src/inspsocket.cpp')
-rw-r--r-- | src/inspsocket.cpp | 31 |
1 files changed, 3 insertions, 28 deletions
diff --git a/src/inspsocket.cpp b/src/inspsocket.cpp index fbeb60122..7ddd77495 100644 --- a/src/inspsocket.cpp +++ b/src/inspsocket.cpp @@ -114,15 +114,7 @@ void StreamSocket::Close() DoWrite(); if (GetIOHook()) { - try - { - GetIOHook()->OnStreamSocketClose(this); - } - catch (CoreException& modexcept) - { - ServerInstance->Logs->Log("SOCKET", LOG_DEFAULT, "%s threw an exception: %s", - modexcept.GetSource().c_str(), modexcept.GetReason().c_str()); - } + GetIOHook()->OnStreamSocketClose(this); delete iohook; DelIOHook(); } @@ -151,17 +143,7 @@ void StreamSocket::DoRead() { if (GetIOHook()) { - int rv = -1; - try - { - rv = GetIOHook()->OnStreamSocketRead(this, recvq); - } - catch (CoreException& modexcept) - { - ServerInstance->Logs->Log("SOCKET", LOG_DEFAULT, "%s threw an exception: %s", - modexcept.GetSource().c_str(), modexcept.GetReason().c_str()); - return; - } + int rv = GetIOHook()->OnStreamSocketRead(this, recvq); if (rv > 0) OnDataReady(); if (rv < 0) @@ -219,8 +201,6 @@ void StreamSocket::DoWrite() if (GetIOHook()) { - int rv = -1; - try { while (error.empty() && !sendq.empty()) { @@ -246,7 +226,7 @@ void StreamSocket::DoWrite() int itemlen = front.length(); { - rv = GetIOHook()->OnStreamSocketWrite(this, front); + int rv = GetIOHook()->OnStreamSocketWrite(this, front); if (rv > 0) { // consumed the entire string, and is ready for more @@ -270,11 +250,6 @@ void StreamSocket::DoWrite() } } } - catch (CoreException& modexcept) - { - ServerInstance->Logs->Log("SOCKET", LOG_DEBUG, "%s threw an exception: %s", - modexcept.GetSource().c_str(), modexcept.GetReason().c_str()); - } } else { |