summaryrefslogtreecommitdiff
path: root/cpp/src/IceBT/Util.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/IceBT/Util.cpp')
-rw-r--r--cpp/src/IceBT/Util.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/cpp/src/IceBT/Util.cpp b/cpp/src/IceBT/Util.cpp
index 0ac06c45500..3a6586203e2 100644
--- a/cpp/src/IceBT/Util.cpp
+++ b/cpp/src/IceBT/Util.cpp
@@ -104,9 +104,7 @@ fdToLocalAddress(SOCKET fd, SocketAddress& addr)
if(::getsockname(fd, reinterpret_cast<struct sockaddr*>(&addr), &len) == SOCKET_ERROR)
{
IceInternal::closeSocketNoThrow(fd);
- SocketException ex(__FILE__, __LINE__);
- ex.error = IceInternal::getSocketErrno();
- throw ex;
+ throw SocketException(__FILE__, __LINE__, IceInternal::getSocketErrno());
}
}
@@ -123,9 +121,7 @@ fdToRemoteAddress(SOCKET fd, SocketAddress& addr)
else
{
IceInternal::closeSocketNoThrow(fd);
- SocketException ex(__FILE__, __LINE__);
- ex.error = IceInternal::getSocketErrno();
- throw ex;
+ throw SocketException(__FILE__, __LINE__, IceInternal::getSocketErrno());
}
}