From fa64103aa87a8f0f2a3351bb4a54e93e8ade1082 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Mon, 27 Dec 2010 14:34:17 +0200 Subject: better debug output in segfaults and stack overflows in windows --- src/client.cpp | 34 +++++++++++----------------------- 1 file changed, 11 insertions(+), 23 deletions(-) (limited to 'src/client.cpp') diff --git a/src/client.cpp b/src/client.cpp index af2b375f4..4792490f9 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -31,34 +31,22 @@ void * ClientUpdateThread::Thread() ThreadStarted(); DSTACK(__FUNCTION_NAME); - -#if CATCH_UNHANDLED_EXCEPTIONS - try + + BEGIN_DEBUG_EXCEPTION_HANDLER + + while(getRun()) { -#endif - while(getRun()) - { - m_client->asyncStep(); + m_client->asyncStep(); - //m_client->updateSomeExpiredMeshes(); + //m_client->updateSomeExpiredMeshes(); - bool was = m_client->AsyncProcessData(); + bool was = m_client->AsyncProcessData(); - if(was == false) - sleep_ms(10); - } -#if CATCH_UNHANDLED_EXCEPTIONS + if(was == false) + sleep_ms(10); } - /* - This is what has to be done in threads to get suitable debug info - */ - catch(std::exception &e) - { - dstream<