mirror of
https://github.com/glest/glest-source.git
synced 2025-08-22 07:52:51 +02:00
Renamed megaglest_runtime_error to game_runtime_error
This commit is contained in:
@@ -99,7 +99,7 @@ namespace Shared {
|
||||
if (SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem, "In [%s::%s Line: %d] uniqueID [%s] ret [%d] END\n", __FILE__, __FUNCTION__, __LINE__, uniqueID.c_str(), ret);
|
||||
|
||||
printf("invalid thread delete for ptr: %p", this);
|
||||
//throw megaglest_runtime_error(szBuf);
|
||||
//throw game_runtime_error(szBuf);
|
||||
}
|
||||
if (SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem, "In [%s::%s Line: %d] uniqueID [%s] ret [%d] END\n", __FILE__, __FUNCTION__, __LINE__, uniqueID.c_str(), ret);
|
||||
|
||||
|
@@ -388,7 +388,7 @@ namespace Shared {
|
||||
if (errorOnNotFound) {
|
||||
std::stringstream msg;
|
||||
msg << "#1 Couldn't scan directory '" << mypath << "': " << strerror(errno);
|
||||
throw megaglest_runtime_error(msg.str());
|
||||
throw game_runtime_error(msg.str());
|
||||
}
|
||||
} else {
|
||||
for (int i = 0; i < (int) globbuf.gl_pathc; ++i) {
|
||||
@@ -409,7 +409,7 @@ namespace Shared {
|
||||
globfree(&globbuf);
|
||||
|
||||
if (results.empty() == true && errorOnNotFound == true) {
|
||||
throw megaglest_runtime_error("No files found in: " + mypath);
|
||||
throw game_runtime_error("No files found in: " + mypath);
|
||||
}
|
||||
|
||||
if (cutExtension) {
|
||||
@@ -1062,7 +1062,7 @@ namespace Shared {
|
||||
if (res < 0) {
|
||||
std::stringstream msg;
|
||||
msg << "#2 Couldn't scan directory '" << mypath << "': " << strerror(errno);
|
||||
throw megaglest_runtime_error(msg.str());
|
||||
throw game_runtime_error(msg.str());
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1101,7 +1101,7 @@ namespace Shared {
|
||||
if (res < 0) {
|
||||
std::stringstream msg;
|
||||
msg << "#3 Couldn't scan directory '" << mypath << "': " << strerror(errno);
|
||||
throw megaglest_runtime_error(msg.str());
|
||||
throw game_runtime_error(msg.str());
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1239,7 +1239,7 @@ namespace Shared {
|
||||
if (res < 0) {
|
||||
std::stringstream msg;
|
||||
msg << "#4 Couldn't scan directory '" << mypath << "': " << strerror(errno);
|
||||
throw megaglest_runtime_error(msg.str());
|
||||
throw game_runtime_error(msg.str());
|
||||
}
|
||||
#endif
|
||||
for (int i = 0; i < (int) globbuf.gl_pathc; ++i) {
|
||||
@@ -1278,7 +1278,7 @@ namespace Shared {
|
||||
if (res < 0) {
|
||||
std::stringstream msg;
|
||||
msg << "#5 Couldn't scan directory '" << mypath << "': " << strerror(errno);
|
||||
throw megaglest_runtime_error(msg.str());
|
||||
throw game_runtime_error(msg.str());
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1377,7 +1377,7 @@ namespace Shared {
|
||||
if (res < 0) {
|
||||
std::stringstream msg;
|
||||
msg << "#6 Couldn't scan directory '" << mypath << "': " << strerror(errno);
|
||||
throw megaglest_runtime_error(msg.str());
|
||||
throw game_runtime_error(msg.str());
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1414,7 +1414,7 @@ namespace Shared {
|
||||
if (res < 0) {
|
||||
std::stringstream msg;
|
||||
msg << "#7 Couldn't scan directory '" << mypath << "': " << strerror(errno);
|
||||
throw megaglest_runtime_error(msg.str());
|
||||
throw game_runtime_error(msg.str());
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -2066,12 +2066,12 @@ namespace Shared {
|
||||
if (fp1 == NULL) {
|
||||
if (fp2) fclose(fp2);
|
||||
|
||||
throw megaglest_runtime_error("cannot open input file [" + fileName + "]");
|
||||
throw game_runtime_error("cannot open input file [" + fileName + "]");
|
||||
}
|
||||
if (fp2 == NULL) {
|
||||
if (fp1) fclose(fp1);
|
||||
|
||||
throw megaglest_runtime_error("cannot open output file [" + tempfileName + "]");
|
||||
throw game_runtime_error("cannot open output file [" + tempfileName + "]");
|
||||
}
|
||||
|
||||
while (fgets(buffer, MAX_LEN_SINGLE_LINE + 2, fp1)) {
|
||||
@@ -2117,7 +2117,7 @@ namespace Shared {
|
||||
if (out.is_open()) {
|
||||
out << data;
|
||||
} else if (out.is_open() == false) {
|
||||
throw megaglest_runtime_error("cannot open input file [" + filename + "]");
|
||||
throw game_runtime_error("cannot open input file [" + filename + "]");
|
||||
}
|
||||
|
||||
//Close file
|
||||
@@ -2147,9 +2147,9 @@ namespace Shared {
|
||||
out.put(in.get());
|
||||
}
|
||||
} else if (in.is_open() == false) {
|
||||
throw megaglest_runtime_error("cannot open input file [" + fromFileName + "]");
|
||||
throw game_runtime_error("cannot open input file [" + fromFileName + "]");
|
||||
} else if (out.is_open() == false) {
|
||||
throw megaglest_runtime_error("cannot open input file [" + toFileName + "]");
|
||||
throw game_runtime_error("cannot open input file [" + toFileName + "]");
|
||||
}
|
||||
|
||||
//Close both files
|
||||
@@ -2201,7 +2201,7 @@ namespace Shared {
|
||||
// ifstream xmlFile(path.c_str(),ios::binary);
|
||||
//#endif
|
||||
// if(xmlFile.is_open() == false) {
|
||||
// throw megaglest_runtime_error("Can not open file: [" + path + "]");
|
||||
// throw game_runtime_error("Can not open file: [" + path + "]");
|
||||
// }
|
||||
//
|
||||
// xmlFile.unsetf(ios::skipws);
|
||||
|
@@ -439,7 +439,7 @@ namespace Shared {
|
||||
SystemFlags::OutputDebug(SystemFlags::debugError, "In [%s::%s Line: %d] Error [%s]\n", extractFileFromDirectoryPath(__FILE__).c_str(), __FUNCTION__, __LINE__, ex.what());
|
||||
if (SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem, "In [%s::%s Line: %d] uniqueID [%s]\n", extractFileFromDirectoryPath(__FILE__).c_str(), __FUNCTION__, __LINE__, this->getUniqueID().c_str());
|
||||
|
||||
//throw megaglest_runtime_error(ex.what());
|
||||
//throw game_runtime_error(ex.what());
|
||||
//abort();
|
||||
}
|
||||
//printf("~SimpleTaskThread LINE: %d this = %p\n",__LINE__,this);
|
||||
@@ -587,7 +587,7 @@ namespace Shared {
|
||||
if (SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem, "In [%s::%s Line: %d] uniqueID [%s] END\n", extractFileFromDirectoryPath(__FILE__).c_str(), __FUNCTION__, __LINE__, this->getUniqueID().c_str());
|
||||
mustDeleteSelf = getDeleteSelfOnExecutionDone();
|
||||
|
||||
throw megaglest_runtime_error(ex.what());
|
||||
throw game_runtime_error(ex.what());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -766,7 +766,7 @@ namespace Shared {
|
||||
if (logList.size() < logCount) {
|
||||
char szBuf[8096] = "";
|
||||
snprintf(szBuf, 8096, "logList.size() <= logCount [%lld][%lld]", (long long int)logList.size(), (long long int)logCount);
|
||||
throw megaglest_runtime_error(szBuf);
|
||||
throw game_runtime_error(szBuf);
|
||||
}
|
||||
logList.erase(logList.begin(), logList.begin() + logCount);
|
||||
}
|
||||
|
@@ -1505,7 +1505,7 @@ namespace Shared {
|
||||
if (additionalBytes > 0) {
|
||||
bytesReceived += additionalBytes;
|
||||
} else {
|
||||
//throw megaglest_runtime_error("additionalBytes == " + intToStr(additionalBytes));
|
||||
//throw game_runtime_error("additionalBytes == " + intToStr(additionalBytes));
|
||||
if (SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork, "In [%s::%s Line: %d] additionalBytes == %d\n", __FILE__, __FUNCTION__, __LINE__, additionalBytes);
|
||||
if (SystemFlags::VERBOSE_MODE_ENABLED) printf("\nIn [%s::%s Line: %d] additionalBytes == %d\n", __FILE__, __FUNCTION__, __LINE__, additionalBytes);
|
||||
if (SystemFlags::getSystemSettingType(SystemFlags::debugError).enabled) SystemFlags::OutputDebug(SystemFlags::debugError, "In [%s::%s Line: %d] additionalBytes == %d\n", __FILE__, __FUNCTION__, __LINE__, additionalBytes);
|
||||
@@ -1901,13 +1901,13 @@ namespace Shared {
|
||||
unsigned char* address;
|
||||
|
||||
if (info == NULL) {
|
||||
throw megaglest_runtime_error("Error getting host by name");
|
||||
throw game_runtime_error("Error getting host by name");
|
||||
}
|
||||
|
||||
address = reinterpret_cast<unsigned char*>(info->h_addr_list[0]);
|
||||
|
||||
if (address == NULL) {
|
||||
throw megaglest_runtime_error("Error getting host ip");
|
||||
throw game_runtime_error("Error getting host ip");
|
||||
}
|
||||
|
||||
return
|
||||
@@ -1919,7 +1919,7 @@ namespace Shared {
|
||||
|
||||
void Socket::throwException(string str) {
|
||||
string msg = str + " " + getLastSocketErrorFormattedText();
|
||||
throw megaglest_runtime_error(msg);
|
||||
throw game_runtime_error(msg);
|
||||
}
|
||||
|
||||
// ===============================================
|
||||
@@ -2374,7 +2374,7 @@ namespace Shared {
|
||||
if (SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork, "%s", szBuf);
|
||||
|
||||
snprintf(szBuf, 8096, "Error binding socket sock = " PLATFORM_SOCKET_FORMAT_TYPE ", address [%s] port = %d err = %d, error = %s\n", sock, this->bindSpecificAddress.c_str(), port, err, getLastSocketErrorFormattedText().c_str());
|
||||
throw megaglest_runtime_error(szBuf);
|
||||
throw game_runtime_error(szBuf);
|
||||
}
|
||||
portBound = true;
|
||||
|
||||
@@ -2847,7 +2847,7 @@ namespace Shared {
|
||||
|
||||
if (UPNPPortForwardList.size() % 2 != 0) {
|
||||
// We need groups of 2 ports.. one external and one internal for opening ports on UPNP router
|
||||
throw megaglest_runtime_error("UPNPPortForwardList.size() MUST BE divisable by 2");
|
||||
throw game_runtime_error("UPNPPortForwardList.size() MUST BE divisable by 2");
|
||||
}
|
||||
|
||||
for (unsigned int clientIndex = 0; clientIndex < UPNPPortForwardList.size(); clientIndex += 2) {
|
||||
|
@@ -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
|
||||
|
@@ -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) {
|
||||
}
|
||||
|
||||
|
@@ -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__);
|
||||
|
@@ -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
|
||||
|
@@ -38,7 +38,7 @@ namespace Shared {
|
||||
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 @@ namespace Shared {
|
||||
return &soundFactoryNone;
|
||||
}
|
||||
|
||||
throw megaglest_runtime_error("Unknown sound factory: [" + name + "]");
|
||||
throw game_runtime_error("Unknown sound factory: [" + name + "]");
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -275,7 +275,7 @@ namespace Shared {
|
||||
return result;
|
||||
}
|
||||
|
||||
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) {
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user