spammed errors will not close the launcher

This commit is contained in:
Anonymous275
2020-11-15 17:10:49 +02:00
parent c517a48fa6
commit b5fd281c8d
2 changed files with 1 additions and 4 deletions
-3
View File
@@ -66,12 +66,9 @@ void warn(const std::string& toPrint){
addToLog(Print);
}
void error(const std::string& toPrint) {
static int ECounter = 0;
std::string Print = getDate() + Sec("[ERROR] ") + toPrint + "\n";
std::cout << Print;
addToLog(Print);
if(ECounter > 10)exit(7);
ECounter++;
}
void except(const std::string& toPrint) {
std::string Print = getDate() + Sec("[EXCEP] ") + toPrint + "\n";