mirror of
https://github.com/glest/glest-source.git
synced 2025-09-03 13:02:37 +02:00
- attempt to shutdown program and threads on unhandled exceptiosn to avoid bad results (thanks for finding this ElimNator)
This commit is contained in:
@@ -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");
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user