Renamed megaglest_runtime_error to game_runtime_error

This commit is contained in:
mathusummut
2018-11-02 12:15:57 +01:00
parent 4eb7dc204e
commit 69ab9716da
116 changed files with 1244 additions and 1244 deletions

View File

@@ -37,7 +37,7 @@ GraphicsFactory *FactoryRepository::getGraphicsFactory(const string &name) {
return &graphicsFactoryGl;
}
throw megaglest_runtime_error("Unknown graphics factory: " + name);
throw game_runtime_error("Unknown graphics factory: " + name);
}
SoundFactory *FactoryRepository::getSoundFactory(const string &name) {
@@ -48,7 +48,7 @@ SoundFactory *FactoryRepository::getSoundFactory(const string &name) {
return &soundFactoryNone;
}
throw megaglest_runtime_error("Unknown sound factory: " + name);
throw game_runtime_error("Unknown sound factory: " + name);
}
}}//end namespace

View File

@@ -361,7 +361,7 @@ string PlatformExceptionHandler::getStackTrace() {
return errMsg;
}
megaglest_runtime_error::megaglest_runtime_error(const string& __arg,bool noStackTrace)
game_runtime_error::game_runtime_error(const string& __arg,bool noStackTrace)
: std::runtime_error(noStackTrace == false ? __arg + PlatformExceptionHandler::getStackTrace() : __arg), noStackTrace(noStackTrace) {
}

View File

@@ -127,7 +127,7 @@ namespace Shared {
char szBuf[8096] = "";
snprintf(szBuf, 8095, "In [%s::%s Line: %d] cannot delete active thread: getRunningStatus(): %d getExecutingTask: %d\n", extractFileFromDirectoryPath(__FILE__).c_str(), __FUNCTION__, __LINE__, base_thread->getRunningStatus(), base_thread->getExecutingTask());
throw megaglest_runtime_error(szBuf);
throw game_runtime_error(szBuf);
}
}
@@ -174,7 +174,7 @@ namespace Shared {
/*if (this != cleanupThread.get()) {
char szBuf[8096] = "";
snprintf(szBuf, 8095, "In [%s::%s Line: %d] iterFind == Thread::threadList.end() Thread::threadList.size() = %ld", extractFileFromDirectoryPath(__FILE__).c_str(), __FUNCTION__, __LINE__, Thread::threadList.size());
throw megaglest_runtime_error(szBuf);
throw game_runtime_error(szBuf);
}*/
} else {
Thread::threadList.erase(iterFind);
@@ -296,7 +296,7 @@ namespace Shared {
char szBuf[8096] = "";
snprintf(szBuf, 8095, "In [%s::%s Line: %d] thread == NULL", extractFileFromDirectoryPath(__FILE__).c_str(), __FUNCTION__, __LINE__);
throw megaglest_runtime_error(szBuf);
throw game_runtime_error(szBuf);
}
if (Thread::getEnableVerboseMode()) printf("In Thread::execute Line: %d\n", __LINE__);
@@ -319,7 +319,7 @@ namespace Shared {
snprintf(szBuf, 8095, "In [%s::%s Line: %d] thread == NULL", extractFileFromDirectoryPath(__FILE__).c_str(), __FUNCTION__, __LINE__);
printf("%s", szBuf);
throw megaglest_runtime_error(szBuf);
throw game_runtime_error(szBuf);
}
MutexSafeWrapper safeMutex(thread->mutexthreadAccessor);
@@ -499,7 +499,7 @@ namespace Shared {
if (this->mutex == NULL) {
char szBuf[8096] = "";
snprintf(szBuf, 8095, "In [%s::%s Line: %d] mutex == NULL", extractFileFromDirectoryPath(__FILE__).c_str(), __FUNCTION__, __LINE__);
throw megaglest_runtime_error(szBuf);
throw game_runtime_error(szBuf);
}
this->deleteownerId = "";
@@ -523,7 +523,7 @@ namespace Shared {
std::vector<Mutex *>::iterator iterFind = std::find(Mutex::mutexList.begin(), Mutex::mutexList.end(), this);
if (iterFind == Mutex::mutexList.end()) {
printf("In [%s::%s Line: %d] iterFind == Mutex::mutexList.end()", extractFileFromDirectoryPath(__FILE__).c_str(), __FUNCTION__, __LINE__);
//throw megaglest_runtime_error(szBuf);
//throw game_runtime_error(szBuf);
}
Mutex::mutexList.erase(iterFind);
safeMutexX.ReleaseLock();
@@ -532,11 +532,11 @@ namespace Shared {
SDLMutexSafeWrapper safeMutex(&mutexAccessor, true);
if (mutex == NULL) {
printf("In [%s::%s Line: %d] mutex == NULL refCount = %d owner [%s] deleteownerId [%s]", extractFileFromDirectoryPath(__FILE__).c_str(), __FUNCTION__, __LINE__, refCount, ownerId.c_str(), deleteownerId.c_str());
//throw megaglest_runtime_error(szBuf);
//throw game_runtime_error(szBuf);
//printf("%s\n",szBuf);
} else if (refCount >= 1) {
printf("In [%s::%s Line: %d] about to destroy mutex refCount = %d owner [%s] deleteownerId [%s]", extractFileFromDirectoryPath(__FILE__).c_str(), __FUNCTION__, __LINE__, refCount, ownerId.c_str(), deleteownerId.c_str());
//throw megaglest_runtime_error(szBuf);
//throw game_runtime_error(szBuf);
}
if (debugMutexLock == true) {
@@ -561,7 +561,7 @@ namespace Shared {
// string stack = PlatformExceptionHandler::getStackTrace();
// char szBuf[8096]="";
// snprintf(szBuf,8095,"In [%s::%s Line: %d] mutex == NULL refCount = %d owner [%s] deleteownerId [%s] stack: %s",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,refCount,ownerId.c_str(),deleteownerId.c_str(),stack.c_str());
// throw megaglest_runtime_error(szBuf);
// throw game_runtime_error(szBuf);
// }
// std::auto_ptr<Chrono> chronoLockPerf;
// if(debugMutexLock == true) {
@@ -585,7 +585,7 @@ namespace Shared {
// if(mutex == NULL) {
// char szBuf[8096]="";
// snprintf(szBuf,8095,"In [%s::%s Line: %d] mutex == NULL refCount = %d owner [%s] deleteownerId [%s]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,refCount,ownerId.c_str(),deleteownerId.c_str());
// throw megaglest_runtime_error(szBuf);
// throw game_runtime_error(szBuf);
// }
refCount--;
@@ -612,14 +612,14 @@ namespace Shared {
if (semaphore == NULL) {
char szBuf[8096] = "";
snprintf(szBuf, 8095, "In [%s::%s Line: %d] semaphore == NULL", extractFileFromDirectoryPath(__FILE__).c_str(), __FUNCTION__, __LINE__);
throw megaglest_runtime_error(szBuf);
throw game_runtime_error(szBuf);
}
}
Semaphore::~Semaphore() {
if (semaphore == NULL) {
printf("In [%s::%s Line: %d] semaphore == NULL", extractFileFromDirectoryPath(__FILE__).c_str(), __FUNCTION__, __LINE__);
//throw megaglest_runtime_error(szBuf);
//throw game_runtime_error(szBuf);
}
SDL_DestroySemaphore(semaphore);
semaphore = NULL;
@@ -629,7 +629,7 @@ namespace Shared {
if (semaphore == NULL) {
char szBuf[8096] = "";
snprintf(szBuf, 8095, "In [%s::%s Line: %d] semaphore == NULL", extractFileFromDirectoryPath(__FILE__).c_str(), __FUNCTION__, __LINE__);
throw megaglest_runtime_error(szBuf);
throw game_runtime_error(szBuf);
}
SDL_SemPost(semaphore);
}
@@ -638,7 +638,7 @@ namespace Shared {
if (semaphore == NULL) {
char szBuf[8096] = "";
snprintf(szBuf, 8095, "In [%s::%s Line: %d] semaphore == NULL", extractFileFromDirectoryPath(__FILE__).c_str(), __FUNCTION__, __LINE__);
throw megaglest_runtime_error(szBuf);
throw game_runtime_error(szBuf);
}
int semValue = 0;
if (waitMilliseconds >= 0) {
@@ -653,7 +653,7 @@ namespace Shared {
if (semaphore == NULL) {
char szBuf[8096] = "";
snprintf(szBuf, 8095, "In [%s::%s Line: %d] semaphore == NULL", extractFileFromDirectoryPath(__FILE__).c_str(), __FUNCTION__, __LINE__);
throw megaglest_runtime_error(szBuf);
throw game_runtime_error(szBuf);
}
int semValue = SDL_SemTryWait(semaphore);
return (semValue == 0);
@@ -663,7 +663,7 @@ namespace Shared {
if (semaphore == NULL) {
char szBuf[8096] = "";
snprintf(szBuf, 8095, "In [%s::%s Line: %d] semaphore == NULL", extractFileFromDirectoryPath(__FILE__).c_str(), __FUNCTION__, __LINE__);
throw megaglest_runtime_error(szBuf);
throw game_runtime_error(szBuf);
}
return SDL_SemValue(semaphore);
@@ -673,7 +673,7 @@ namespace Shared {
if (semaphore == NULL) {
char szBuf[8096] = "";
snprintf(szBuf, 8095, "In [%s::%s Line: %d] semaphore == NULL", extractFileFromDirectoryPath(__FILE__).c_str(), __FUNCTION__, __LINE__);
throw megaglest_runtime_error(szBuf);
throw game_runtime_error(szBuf);
}
uint32 currentValue = SDL_SemValue(semaphore);
@@ -726,7 +726,7 @@ namespace Shared {
if (this->trigger == NULL) {
char szBuf[8096] = "";
snprintf(szBuf, 8095, "In [%s::%s Line: %d] trigger == NULL", extractFileFromDirectoryPath(__FILE__).c_str(), __FUNCTION__, __LINE__);
throw megaglest_runtime_error(szBuf);
throw game_runtime_error(szBuf);
}
if (debugMasterSlaveThreadController) printf("In [%s::%s Line: %d]\n", extractFileFromDirectoryPath(__FILE__).c_str(), __FUNCTION__, __LINE__);
@@ -737,7 +737,7 @@ namespace Shared {
if (trigger == NULL) {
printf("In [%s::%s Line: %d] trigger == NULL", extractFileFromDirectoryPath(__FILE__).c_str(), __FUNCTION__, __LINE__);
//throw megaglest_runtime_error(szBuf);
//throw game_runtime_error(szBuf);
}
if (debugMasterSlaveThreadController) printf("In [%s::%s Line: %d]\n", extractFileFromDirectoryPath(__FILE__).c_str(), __FUNCTION__, __LINE__);
@@ -757,7 +757,7 @@ namespace Shared {
if (trigger == NULL) {
char szBuf[8096] = "";
snprintf(szBuf, 8095, "In [%s::%s Line: %d] trigger == NULL", extractFileFromDirectoryPath(__FILE__).c_str(), __FUNCTION__, __LINE__);
throw megaglest_runtime_error(szBuf);
throw game_runtime_error(szBuf);
}
//MutexSafeWrapper safeMutex(mutex);
@@ -789,12 +789,12 @@ namespace Shared {
if (trigger == NULL) {
char szBuf[8096] = "";
snprintf(szBuf, 8095, "In [%s::%s Line: %d] trigger == NULL", extractFileFromDirectoryPath(__FILE__).c_str(), __FUNCTION__, __LINE__);
throw megaglest_runtime_error(szBuf);
throw game_runtime_error(szBuf);
}
if (mutex == NULL) {
char szBuf[8096] = "";
snprintf(szBuf, 8095, "In [%s::%s Line: %d] mutex == NULL", extractFileFromDirectoryPath(__FILE__).c_str(), __FUNCTION__, __LINE__);
throw megaglest_runtime_error(szBuf);
throw game_runtime_error(szBuf);
}
if (debugMasterSlaveThreadController) printf("In [%s::%s Line: %d]\n", extractFileFromDirectoryPath(__FILE__).c_str(), __FUNCTION__, __LINE__);

View File

@@ -489,11 +489,11 @@ namespace Shared {
} catch (const char *e) {
SystemFlags::OutputDebug(SystemFlags::debugError, "In [%s::%s Line: %d] (a1) Couldn't process event: [%s] codeLocation = %s\n", extractFileFromDirectoryPath(__FILE__).c_str(), __FUNCTION__, __LINE__, e, codeLocation.c_str());
if (SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem, "In [%s::%s Line: %d] (a1) Couldn't process event: [%s] codeLocation = %s\n", extractFileFromDirectoryPath(__FILE__).c_str(), __FUNCTION__, __LINE__, e, codeLocation.c_str());
throw megaglest_runtime_error(e);
throw game_runtime_error(e);
} catch (const std::runtime_error& e) {
SystemFlags::OutputDebug(SystemFlags::debugError, "In [%s::%s Line: %d] (a2) Couldn't process event: [%s] codeLocation = %s\n", extractFileFromDirectoryPath(__FILE__).c_str(), __FUNCTION__, __LINE__, e.what(), codeLocation.c_str());
if (SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem, "In [%s::%s Line: %d] (a2) Couldn't process event: [%s] codeLocation = %s\n", extractFileFromDirectoryPath(__FILE__).c_str(), __FUNCTION__, __LINE__, e.what(), codeLocation.c_str());
throw megaglest_runtime_error(e.what());
throw game_runtime_error(e.what());
} catch (const std::exception& e) {
SystemFlags::OutputDebug(SystemFlags::debugError, "In [%s::%s Line: %d] (b) Couldn't process event: [%s] codeLocation = %s\n", extractFileFromDirectoryPath(__FILE__).c_str(), __FUNCTION__, __LINE__, e.what(), codeLocation.c_str());
if (SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem, "In [%s::%s Line: %d] (b) Couldn't process event: [%s] codeLocation = %s\n", extractFileFromDirectoryPath(__FILE__).c_str(), __FUNCTION__, __LINE__, e.what(), codeLocation.c_str());
@@ -755,7 +755,7 @@ namespace Shared {
}
} else {
string sError = "Unsupported key name: [" + value + "]";
throw megaglest_runtime_error(sError.c_str());
throw game_runtime_error(sError.c_str());
}
// Because SDL is based on lower Ascii