diff options
Diffstat (limited to 'libcxx/src/thread.cpp')
-rw-r--r-- | libcxx/src/thread.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/libcxx/src/thread.cpp b/libcxx/src/thread.cpp index 467402b6b42..4775e10f6ab 100644 --- a/libcxx/src/thread.cpp +++ b/libcxx/src/thread.cpp @@ -53,10 +53,9 @@ thread::join() if (ec == 0) __t_ = 0; } -#ifndef _LIBCPP_NO_EXCEPTIONS + if (ec) - throw system_error(error_code(ec, system_category()), "thread::join failed"); -#endif // _LIBCPP_NO_EXCEPTIONS + __throw_system_error(ec, "thread::join failed"); } void @@ -69,10 +68,9 @@ thread::detach() if (ec == 0) __t_ = 0; } -#ifndef _LIBCPP_NO_EXCEPTIONS + if (ec) - throw system_error(error_code(ec, system_category()), "thread::detach failed"); -#endif // _LIBCPP_NO_EXCEPTIONS + __throw_system_error(ec, "thread::detach failed"); } unsigned |