aboutsummaryrefslogtreecommitdiffstats
path: root/common/os/Thread.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'common/os/Thread.cxx')
-rw-r--r--common/os/Thread.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/common/os/Thread.cxx b/common/os/Thread.cxx
index 91f7fd07..e99be63e 100644
--- a/common/os/Thread.cxx
+++ b/common/os/Thread.cxx
@@ -66,7 +66,7 @@ void Thread::start()
#ifdef WIN32
*(HANDLE*)threadId = CreateThread(nullptr, 0, startRoutine, this, 0, nullptr);
if (*(HANDLE*)threadId == nullptr)
- throw rdr::SystemException("Failed to create thread", GetLastError());
+ throw rdr::Win32Exception("Failed to create thread", GetLastError());
#else
int ret;
sigset_t all, old;
@@ -76,14 +76,14 @@ void Thread::start()
sigfillset(&all);
ret = pthread_sigmask(SIG_SETMASK, &all, &old);
if (ret != 0)
- throw rdr::SystemException("Failed to mask signals", ret);
+ throw rdr::PosixException("Failed to mask signals", ret);
ret = pthread_create((pthread_t*)threadId, nullptr, startRoutine, this);
pthread_sigmask(SIG_SETMASK, &old, nullptr);
if (ret != 0)
- throw rdr::SystemException("Failed to create thread", ret);
+ throw rdr::PosixException("Failed to create thread", ret);
#endif
running = true;
@@ -99,13 +99,13 @@ void Thread::wait()
ret = WaitForSingleObject(*(HANDLE*)threadId, INFINITE);
if (ret != WAIT_OBJECT_0)
- throw rdr::SystemException("Failed to join thread", GetLastError());
+ throw rdr::Win32Exception("Failed to join thread", GetLastError());
#else
int ret;
ret = pthread_join(*(pthread_t*)threadId, nullptr);
if (ret != 0)
- throw rdr::SystemException("Failed to join thread", ret);
+ throw rdr::PosixException("Failed to join thread", ret);
#endif
}