common: try to print a nice error message when pthread_create is bad

This commit is contained in:
Gregory Hainaut 2016-08-12 10:05:14 +02:00
parent 332ef5892b
commit 078577c7c5
1 changed files with 1 additions and 1 deletions

View File

@ -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 ) ) )
{