Provide an API for accessing internal errors.

This commit is contained in:
Malcolm Tyrrell
2020-07-23 15:07:24 +01:00
parent 48ec3ef458
commit b1ed751b83
6 changed files with 63 additions and 17 deletions

View File

@@ -130,11 +130,17 @@ aiScene *BaseImporter::ReadFile(Importer *pImp, const std::string &pFile, IOSyst
// passes scale into ScaleProcess
UpdateImporterScale(pImp);
} catch (const std::exception &err) {
} catch( const DeadlyImportError& err ) {
// extract error description
m_ErrorText = err.what();
ASSIMP_LOG_ERROR(m_ErrorText);
return nullptr;
} catch( const std::exception& err ) {
// extract error description
m_ErrorText = "Internal error";
ASSIMP_LOG_ERROR(err.what());
m_internalException = std::current_exception();
return nullptr;
}
// return what we gathered from the import.