Add backtrace print to fatal logvisor errors

This commit is contained in:
Jack Andersen
2016-09-07 20:13:49 -10:00
parent 48dc4c40c7
commit ac88aa934d
2 changed files with 99 additions and 4 deletions

View File

@@ -15,6 +15,8 @@ extern "C" void logvisorBp();
namespace logvisor
{
void logvisorAbort();
#if _WIN32 && UNICODE
#define LOG_UCS2 1
#endif
@@ -114,6 +116,11 @@ void RegisterConsoleLogger();
*/
void RegisterFileLogger(const char* filepath);
/**
* @brief Register signal handlers with system for common client exceptions
*/
void RegisterStandardExceptions();
#if _WIN32
/**
* @brief Spawn an application-owned cmd.exe window for displaying console output
@@ -170,7 +177,7 @@ public:
if (severity == Error || severity == Fatal)
logvisorBp();
if (severity == Fatal)
abort();
logvisorAbort();
else if (severity == Error)
++ErrorCount;
}
@@ -204,7 +211,7 @@ public:
}
if (severity == Fatal)
abort();
logvisorAbort();
else if (severity == Error)
++ErrorCount;
}