forked from Mirrorlandia_minetest/minetest
Always use errorstream for DEBUG_EXCEPTION_HANDLER
This commit is contained in:
parent
4236792b87
commit
6f4d6cb574
12
src/debug.h
12
src/debug.h
@ -126,16 +126,16 @@ private:
|
|||||||
|
|
||||||
#if CATCH_UNHANDLED_EXCEPTIONS == 1
|
#if CATCH_UNHANDLED_EXCEPTIONS == 1
|
||||||
#define BEGIN_DEBUG_EXCEPTION_HANDLER try {
|
#define BEGIN_DEBUG_EXCEPTION_HANDLER try {
|
||||||
#define END_DEBUG_EXCEPTION_HANDLER(logstream) \
|
#define END_DEBUG_EXCEPTION_HANDLER \
|
||||||
} catch (std::exception &e) { \
|
} catch (std::exception &e) { \
|
||||||
logstream << "An unhandled exception occurred: " \
|
errorstream << "An unhandled exception occurred: " \
|
||||||
<< e.what() << std::endl; \
|
<< e.what() << std::endl; \
|
||||||
FATAL_ERROR(e.what()); \
|
FATAL_ERROR(e.what()); \
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
// Dummy ones
|
// Dummy ones
|
||||||
#define BEGIN_DEBUG_EXCEPTION_HANDLER
|
#define BEGIN_DEBUG_EXCEPTION_HANDLER
|
||||||
#define END_DEBUG_EXCEPTION_HANDLER(logstream)
|
#define END_DEBUG_EXCEPTION_HANDLER
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // DEBUG_HEADER
|
#endif // DEBUG_HEADER
|
||||||
|
@ -700,6 +700,6 @@ void *EmergeThread::run()
|
|||||||
m_server->setAsyncFatalError(err.str());
|
m_server->setAsyncFatalError(err.str());
|
||||||
}
|
}
|
||||||
|
|
||||||
END_DEBUG_EXCEPTION_HANDLER(errorstream)
|
END_DEBUG_EXCEPTION_HANDLER
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -677,7 +677,7 @@ protected:
|
|||||||
else
|
else
|
||||||
waitForIO(100);
|
waitForIO(100);
|
||||||
|
|
||||||
END_DEBUG_EXCEPTION_HANDLER(errorstream)
|
END_DEBUG_EXCEPTION_HANDLER
|
||||||
}
|
}
|
||||||
|
|
||||||
// Call curl_multi_remove_handle and cleanup easy handles
|
// Call curl_multi_remove_handle and cleanup easy handles
|
||||||
|
@ -226,7 +226,7 @@ int main(int argc, char *argv[])
|
|||||||
// Stop httpfetch thread (if started)
|
// Stop httpfetch thread (if started)
|
||||||
httpfetch_cleanup();
|
httpfetch_cleanup();
|
||||||
|
|
||||||
END_DEBUG_EXCEPTION_HANDLER(errorstream);
|
END_DEBUG_EXCEPTION_HANDLER
|
||||||
|
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
@ -1316,7 +1316,7 @@ void * ConnectionSendThread::run()
|
|||||||
/* send non reliable packets */
|
/* send non reliable packets */
|
||||||
sendPackets(dtime);
|
sendPackets(dtime);
|
||||||
|
|
||||||
END_DEBUG_EXCEPTION_HANDLER(errorstream);
|
END_DEBUG_EXCEPTION_HANDLER
|
||||||
}
|
}
|
||||||
|
|
||||||
PROFILE(g_profiler->remove(ThreadIdentifier.str()));
|
PROFILE(g_profiler->remove(ThreadIdentifier.str()));
|
||||||
@ -2097,7 +2097,7 @@ void * ConnectionReceiveThread::run()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
END_DEBUG_EXCEPTION_HANDLER(errorstream);
|
END_DEBUG_EXCEPTION_HANDLER
|
||||||
}
|
}
|
||||||
|
|
||||||
PROFILE(g_profiler->remove(ThreadIdentifier.str()));
|
PROFILE(g_profiler->remove(ThreadIdentifier.str()));
|
||||||
|
@ -112,7 +112,7 @@ void *ServerThread::run()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
END_DEBUG_EXCEPTION_HANDLER(errorstream)
|
END_DEBUG_EXCEPTION_HANDLER
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -223,7 +223,7 @@ public:
|
|||||||
doUpdate();
|
doUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
END_DEBUG_EXCEPTION_HANDLER(errorstream)
|
END_DEBUG_EXCEPTION_HANDLER
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user