diff --git a/code/ASEParser.cpp b/code/ASEParser.cpp index cba206d72..98dd30457 100644 --- a/code/ASEParser.cpp +++ b/code/ASEParser.cpp @@ -168,7 +168,7 @@ void Parser::LogInfo(const char* szWarn) } // ------------------------------------------------------------------------------------------------ -void Parser::LogError(const char* szWarn) +AI_WONT_RETURN void Parser::LogError(const char* szWarn) { ai_assert(NULL != szWarn); diff --git a/code/ASEParser.h b/code/ASEParser.h index 84192e5c9..e7a01c9da 100644 --- a/code/ASEParser.h +++ b/code/ASEParser.h @@ -602,7 +602,7 @@ private: // ------------------------------------------------------------------- //! Output an error to the logger //! \param szWarn Error message - void LogError(const char* szWarn); + AI_WONT_RETURN void LogError(const char* szWarn) AI_WONT_RETURN_SUFFIX; // ------------------------------------------------------------------- //! Parse a string, enclosed in double quotation marks diff --git a/code/B3DImporter.cpp b/code/B3DImporter.cpp index 20e4cff94..aa862a1fe 100644 --- a/code/B3DImporter.cpp +++ b/code/B3DImporter.cpp @@ -127,12 +127,12 @@ void B3DImporter::InternReadFile( const std::string& pFile, aiScene* pScene, IOS } // ------------------------------------------------------------------------------------------------ -void B3DImporter::Oops(){ +AI_WONT_RETURN void B3DImporter::Oops(){ throw DeadlyImportError( "B3D Importer - INTERNAL ERROR" ); } // ------------------------------------------------------------------------------------------------ -void B3DImporter::Fail( string str ){ +AI_WONT_RETURN void B3DImporter::Fail( string str ){ #ifdef DEBUG_B3D cout<<"Error in B3D file data: "<KeyToken()); diff --git a/code/FBXTokenizer.cpp b/code/FBXTokenizer.cpp index caa80c191..88ac1257d 100644 --- a/code/FBXTokenizer.cpp +++ b/code/FBXTokenizer.cpp @@ -86,7 +86,8 @@ namespace { // ------------------------------------------------------------------------------------------------ // signal tokenization error, this is always unrecoverable. Throws DeadlyImportError. -void TokenizeError(const std::string& message, unsigned int line, unsigned int column) +AI_WONT_RETURN void TokenizeError(const std::string& message, unsigned int line, unsigned int column) AI_WONT_RETURN_SUFFIX; +AI_WONT_RETURN void TokenizeError(const std::string& message, unsigned int line, unsigned int column) { throw DeadlyImportError(Util::AddLineAndColumn("FBX-Tokenize",message,line,column)); } diff --git a/code/MD5Parser.cpp b/code/MD5Parser.cpp index cf3590b62..2ca348b64 100644 --- a/code/MD5Parser.cpp +++ b/code/MD5Parser.cpp @@ -88,7 +88,7 @@ MD5Parser::MD5Parser(char* _buffer, unsigned int _fileSize ) // ------------------------------------------------------------------------------------------------ // Report error to the log stream -/*static*/ void MD5Parser::ReportError (const char* error, unsigned int line) +/*static*/ AI_WONT_RETURN void MD5Parser::ReportError (const char* error, unsigned int line) { char szBuffer[1024]; ::sprintf(szBuffer,"[MD5] Line %i: %s",line,error); diff --git a/code/MD5Parser.h b/code/MD5Parser.h index 844a783bb..31b0e2038 100644 --- a/code/MD5Parser.h +++ b/code/MD5Parser.h @@ -367,7 +367,7 @@ public: * @param error Error message to be reported * @param line Index of the line where the error occured */ - static void ReportError (const char* error, unsigned int line); + AI_WONT_RETURN static void ReportError (const char* error, unsigned int line) AI_WONT_RETURN_SUFFIX; // ------------------------------------------------------------------- /** Report a specific warning diff --git a/code/OgreXmlSerializer.cpp b/code/OgreXmlSerializer.cpp index 733e36c03..ffda7967e 100644 --- a/code/OgreXmlSerializer.cpp +++ b/code/OgreXmlSerializer.cpp @@ -54,7 +54,8 @@ namespace Assimp namespace Ogre { -void ThrowAttibuteError(const XmlReader* reader, const std::string &name, const std::string &error = "") +AI_WONT_RETURN void ThrowAttibuteError(const XmlReader* reader, const std::string &name, const std::string &error = "") AI_WONT_RETURN_SUFFIX; +AI_WONT_RETURN void ThrowAttibuteError(const XmlReader* reader, const std::string &name, const std::string &error) { if (!error.empty()) { diff --git a/code/XFileParser.cpp b/code/XFileParser.cpp index a62aef414..96fb89cae 100644 --- a/code/XFileParser.cpp +++ b/code/XFileParser.cpp @@ -1432,7 +1432,7 @@ aiColor3D XFileParser::ReadRGB() // ------------------------------------------------------------------------------------------------ // Throws an exception with a line number and the given text. -void XFileParser::ThrowException( const std::string& pText) +AI_WONT_RETURN void XFileParser::ThrowException( const std::string& pText) { if( mIsBinaryFormat) throw DeadlyImportError( pText); diff --git a/code/XFileParser.h b/code/XFileParser.h index 900555f32..d6144e822 100644 --- a/code/XFileParser.h +++ b/code/XFileParser.h @@ -134,7 +134,7 @@ protected: aiColor4D ReadRGBA(); /** Throws an exception with a line number and the given text. */ - void ThrowException( const std::string& pText); + AI_WONT_RETURN void ThrowException( const std::string& pText) AI_WONT_RETURN_SUFFIX; /** Filters the imported hierarchy for some degenerated cases that some exporters produce. * @param pData The sub-hierarchy to filter diff --git a/tools/assimp_cmd/CompareDump.cpp b/tools/assimp_cmd/CompareDump.cpp index b46407fe8..33db0eb3d 100644 --- a/tools/assimp_cmd/CompareDump.cpp +++ b/tools/assimp_cmd/CompareDump.cpp @@ -221,7 +221,7 @@ public: private: /* Report failure */ - void failure(const std::string& err, const std::string& name) { + AI_WONT_RETURN void failure(const std::string& err, const std::string& name) AI_WONT_RETURN_SUFFIX { std::stringstream ss; throw compare_fails_exception((ss << "Files are different at "