- attempt to shutdown program and threads on unhandled exceptiosn to avoid bad results (thanks for finding this ElimNator)

This commit is contained in:
Mark Vejvoda
2011-01-22 01:23:45 +00:00
parent c5def0c3c2
commit d3db6a370c

View File

@@ -152,6 +152,12 @@ void fatal(const char *s, ...) // failure exit
} }
} }
// Now try to shutdown threads if possible
Program *program = Program::getInstance();
delete program;
program = NULL;
// END
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
@@ -382,6 +388,12 @@ public:
#endif #endif
message(err); message(err);
} }
// Now try to shutdown threads if possible
delete program;
program = NULL;
// END
showCursor(true); showCursor(true);
restoreVideoMode(true); restoreVideoMode(true);
@@ -412,7 +424,13 @@ public:
showCursor(true); showCursor(true);
restoreVideoMode(true); restoreVideoMode(true);
SystemFlags::OutputDebug(SystemFlags::debugSystem,"%s\n",msg); SystemFlags::OutputDebug(SystemFlags::debugSystem,"%s\n",msg);
//SystemFlags::Close();
// Now try to shutdown threads if possible
Program *program = Program::getInstance();
delete program;
program = NULL;
// END
exit(0); exit(0);
} }
@@ -978,7 +996,7 @@ void setupLogging(Config &config, bool haveSpecialOutputCommandLineOption) {
} }
void runTechValidationReport(int argc, char** argv) { void runTechValidationReport(int argc, char** argv) {
disableBacktrace=true; //disableBacktrace=true;
printf("====== Started Validation ======\n"); printf("====== Started Validation ======\n");