diff options
author | Bernard Normier <bernard@zeroc.com> | 2003-04-16 04:24:18 +0000 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2003-04-16 04:24:18 +0000 |
commit | 3c99b3b3923f419eb3c2934fb017dadea6180fc6 (patch) | |
tree | c61d296def71d4c261637ef1297706883bf17d94 /cpp/src/IceUtil/ThreadException.cpp | |
parent | a link cost of 0 means accept all messages regardless of cost (diff) | |
download | ice-3c99b3b3923f419eb3c2934fb017dadea6180fc6.tar.bz2 ice-3c99b3b3923f419eb3c2934fb017dadea6180fc6.tar.xz ice-3c99b3b3923f419eb3c2934fb017dadea6180fc6.zip |
Mutex and Lock changes: lock/unlock now return void, trylock returns a bool
that indicates whether the lock was acquired or not, plus new member
functions on LockT/TryLockT
Diffstat (limited to 'cpp/src/IceUtil/ThreadException.cpp')
-rw-r--r-- | cpp/src/IceUtil/ThreadException.cpp | 15 |
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) { |