Revamp exception handling. ImportErrorException renamed to DeadlyImportError to avoid silent regressions. Exceptions now thrown by value, and caught by reference. Put guards in all C++ and C API functions to avoid unwanted exception propagation across module and language boundaries.
PLEASE TEST CAREFULLY IF THIS SHOULD CAUSE REGRESSIONS. git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@617 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
This commit is contained in:
@@ -110,7 +110,7 @@ void ASEImporter::InternReadFile( const std::string& pFile,
|
||||
|
||||
// Check whether we can read from the file
|
||||
if( file.get() == NULL) {
|
||||
throw new ImportErrorException( "Failed to open ASE file " + pFile + ".");
|
||||
throw DeadlyImportError( "Failed to open ASE file " + pFile + ".");
|
||||
}
|
||||
|
||||
// Allocate storage and copy the contents of the file to a memory buffer
|
||||
@@ -703,7 +703,7 @@ void ASEImporter::BuildNodes() {
|
||||
|
||||
// The root node should not have at least one child or the file is valid
|
||||
if (!pcScene->mRootNode->mNumChildren) {
|
||||
throw new ImportErrorException("ASE: No nodes loaded. The file is either empty or corrupt");
|
||||
throw DeadlyImportError("ASE: No nodes loaded. The file is either empty or corrupt");
|
||||
}
|
||||
|
||||
// Now rotate the whole scene 90 degrees around the x axis to convert to internal coordinate system
|
||||
|
||||
Reference in New Issue
Block a user