rework windows crash handler

* use -Ofast -fomit-frame-pointer for release
* new windows crash handler that can generate backtraces reports
* fix crash after fatal errors
This commit is contained in:
Eduardo Bart
2012-03-21 12:31:34 -03:00
parent c7469e4454
commit 57adcb38bd
6 changed files with 170 additions and 85 deletions

View File

@@ -28,6 +28,10 @@ Logger g_logger;
void Logger::log(Fw::LogLevel level, const std::string& message)
{
static bool ignoreLogs = false;
if(ignoreLogs)
return;
const static std::string logPrefixes[] = { "", "", "WARNING: ", "ERROR: ", "FATAL ERROR: " };
std::string outmsg = logPrefixes[level] + message;
@@ -41,6 +45,7 @@ void Logger::log(Fw::LogLevel level, const std::string& message)
if(level == Fw::LogFatal) {
g_window.displayFatalError(message);
ignoreLogs = true;
exit(-1);
}
}