mirror of
https://github.com/glest/glest-source.git
synced 2025-09-27 07:59:00 +02:00
- updated error handling to be more flexible so we can display better error details (like bad tga file, etc)
This commit is contained in:
@@ -1279,8 +1279,15 @@ void Model::loadG3d(const string &path, bool deletePixMapAfterLoad,
|
||||
}
|
||||
|
||||
fclose(f);
|
||||
}
|
||||
catch(megaglest_runtime_error& ex) {
|
||||
//printf("1111111 ex.wantStackTrace() = %d\n",ex.wantStackTrace());
|
||||
SystemFlags::OutputDebug(SystemFlags::debugError,"In [%s::%s Line: %d] Error [%s]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,ex.what());
|
||||
//printf("2222222\n");
|
||||
throw megaglest_runtime_error("Exception caught loading 3d file: " + path +"\n"+ ex.what(),!ex.wantStackTrace());
|
||||
}
|
||||
catch(exception &e){
|
||||
//abort();
|
||||
SystemFlags::OutputDebug(SystemFlags::debugError,"In [%s::%s Line: %d] Error [%s]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,e.what());
|
||||
throw megaglest_runtime_error("Exception caught loading 3d file: " + path +"\n"+ e.what());
|
||||
}
|
||||
|
Reference in New Issue
Block a user