From 078577c7c564de3644a928c34367535e7848c4eb Mon Sep 17 00:00:00 2001 From: Gregory Hainaut Date: Fri, 12 Aug 2016 10:05:14 +0200 Subject: [PATCH] common: try to print a nice error message when pthread_create is bad --- common/src/Utilities/ThreadTools.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/src/Utilities/ThreadTools.cpp b/common/src/Utilities/ThreadTools.cpp index 75c53bda43..f2aa848d93 100644 --- a/common/src/Utilities/ThreadTools.cpp +++ b/common/src/Utilities/ThreadTools.cpp @@ -259,7 +259,7 @@ void Threading::pxThread::Start() pxThreadLog.Write(GetName(), L"Calling pthread_create..."); if( pthread_create( &m_thread, NULL, _internal_callback, this ) != 0 ) - throw Exception::ThreadCreationError( this ); + throw Exception::ThreadCreationError( this ).SetDiagMsg( L"Thread creation error: " + wxString(std::strerror(errno)) ); if( !m_sem_startup.WaitWithoutYield( wxTimeSpan( 0, 0, 3, 0 ) ) ) {