summaryrefslogtreecommitdiff
path: root/cpp/src/IceUtil/ThreadException.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/IceUtil/ThreadException.cpp')
-rw-r--r--cpp/src/IceUtil/ThreadException.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/cpp/src/IceUtil/ThreadException.cpp b/cpp/src/IceUtil/ThreadException.cpp
index 86fd1e20852..857fc962987 100644
--- a/cpp/src/IceUtil/ThreadException.cpp
+++ b/cpp/src/IceUtil/ThreadException.cpp
@@ -16,13 +16,9 @@
using namespace std;
-IceUtil::ThreadSyscallException::ThreadSyscallException(const char* file, int line) :
+IceUtil::ThreadSyscallException::ThreadSyscallException(const char* file, int line, int err ):
Exception(file, line),
-#ifdef _WIN32
- _error(GetLastError())
-#else
- _error(errno)
-#endif
+ _error(err)
{
}
@@ -80,6 +76,13 @@ IceUtil::ThreadSyscallException::ice_throw() const
throw *this;
}
+int
+IceUtil::ThreadSyscallException::error() const
+{
+ return _error;
+}
+
+
IceUtil::ThreadLockedException::ThreadLockedException(const char* file, int line) :
Exception(file, line)
{