From e4ffd4d715c2cf4b431d04f11cf144e575bc0823 Mon Sep 17 00:00:00 2001 From: Mario Emmenlauer Date: Wed, 10 Nov 2021 13:20:14 +0100 Subject: [PATCH] googletest/src/gtest-port.cc: Added GetLastError() on Windows for CreateThread() --- googletest/src/gtest-port.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/googletest/src/gtest-port.cc b/googletest/src/gtest-port.cc index f63625b5..5ee77403 100644 --- a/googletest/src/gtest-port.cc +++ b/googletest/src/gtest-port.cc @@ -629,7 +629,8 @@ class ThreadLocalRegistryImpl { &ThreadLocalRegistryImpl::WatcherThreadFunc, reinterpret_cast(new ThreadIdAndHandle(thread_id, thread)), CREATE_SUSPENDED, &watcher_thread_id); - GTEST_CHECK_(watcher_thread != nullptr); + GTEST_CHECK_(watcher_thread != nullptr) + << "CreateThread failed with error " << ::GetLastError() << "."; // Give the watcher thread the same priority as ours to avoid being // blocked by it. ::SetThreadPriority(watcher_thread,