|
@@ -168,6 +168,7 @@ LONG WINAPI onUnhandledException(EXCEPTION_POINTERS* exception)
|
|
|
|
|
|
#endif
|
|
#endif
|
|
|
|
|
|
|
|
+#ifdef NDEBUG
|
|
[[noreturn]] static void onTerminate()
|
|
[[noreturn]] static void onTerminate()
|
|
{
|
|
{
|
|
logGlobal->error("Disaster happened.");
|
|
logGlobal->error("Disaster happened.");
|
|
@@ -205,6 +206,7 @@ LONG WINAPI onUnhandledException(EXCEPTION_POINTERS* exception)
|
|
#endif
|
|
#endif
|
|
std::abort();
|
|
std::abort();
|
|
}
|
|
}
|
|
|
|
+#endif
|
|
|
|
|
|
void CConsoleHandler::setColor(EConsoleTextColor::EConsoleTextColor color)
|
|
void CConsoleHandler::setColor(EConsoleTextColor::EConsoleTextColor color)
|
|
{
|
|
{
|
|
@@ -296,14 +298,14 @@ CConsoleHandler::CConsoleHandler():
|
|
|
|
|
|
GetConsoleScreenBufferInfo(handleErr, &csbi);
|
|
GetConsoleScreenBufferInfo(handleErr, &csbi);
|
|
defErrColor = csbi.wAttributes;
|
|
defErrColor = csbi.wAttributes;
|
|
-#ifndef _DEBUG
|
|
|
|
|
|
+#ifdef NDEBUG
|
|
SetUnhandledExceptionFilter(onUnhandledException);
|
|
SetUnhandledExceptionFilter(onUnhandledException);
|
|
#endif
|
|
#endif
|
|
#else
|
|
#else
|
|
defColor = "\x1b[0m";
|
|
defColor = "\x1b[0m";
|
|
#endif
|
|
#endif
|
|
|
|
|
|
-#ifndef _DEBUG
|
|
|
|
|
|
+#ifdef NDEBUG
|
|
std::set_terminate(onTerminate);
|
|
std::set_terminate(onTerminate);
|
|
#endif
|
|
#endif
|
|
}
|
|
}
|