1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-11 17:51:04 +00:00

better debug output in segfaults and stack overflows in windows

This commit is contained in:
Perttu Ahola 2010-12-27 14:34:17 +02:00
parent 847a4227b8
commit fa64103aa8
9 changed files with 138 additions and 90 deletions

View file

@ -125,6 +125,8 @@ int main(int argc, char *argv[])
initializeMaterialProperties();
BEGIN_DEBUG_EXCEPTION_HANDLER
try
{
@ -345,17 +347,8 @@ int main(int argc, char *argv[])
{
dstream<<DTIME<<"Connection timed out."<<std::endl;
}
#if CATCH_UNHANDLED_EXCEPTIONS
/*
This is what has to be done in every thread to get suitable debug info
*/
catch(std::exception &e)
{
dstream<<std::endl<<DTIME<<"An unhandled exception occurred: "
<<e.what()<<std::endl;
assert(0);
}
#endif
END_DEBUG_EXCEPTION_HANDLER
debugstreams_deinit();