Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/collada/ErrorHandler.cpp')
-rw-r--r--source/blender/collada/ErrorHandler.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/source/blender/collada/ErrorHandler.cpp b/source/blender/collada/ErrorHandler.cpp
index 7108dbad18a..61c03ed673c 100644
--- a/source/blender/collada/ErrorHandler.cpp
+++ b/source/blender/collada/ErrorHandler.cpp
@@ -49,6 +49,8 @@ ErrorHandler::~ErrorHandler()
//--------------------------------------------------------------------
bool ErrorHandler::handleError( const COLLADASaxFWL::IError* error )
{
+ mError = true;
+
if ( error->getErrorClass() == COLLADASaxFWL::IError::ERROR_SAXPARSER )
{
COLLADASaxFWL::SaxParserError* saxParserError = (COLLADASaxFWL::SaxParserError*) error;
@@ -59,32 +61,29 @@ bool ErrorHandler::handleError( const COLLADASaxFWL::IError* error )
{
if ( strcmp(parserError.getElement(), "effect") == 0 )
{
- return false;
+ mError = false;
}
}
if ( parserError.getErrorType() == GeneratedSaxParser::ParserError::ERROR_VALIDATION_SEQUENCE_PREVIOUS_SIBLING_NOT_PRESENT)
{
- if ( (strcmp(parserError.getElement(), "extra") == 0)
- && (strcmp(parserError.getAdditionalText().c_str(), "sibling: fx_profile_abstract") == 0))
+ if ( !((strcmp(parserError.getElement(), "extra") == 0)
+ && (strcmp(parserError.getAdditionalText().c_str(), "sibling: fx_profile_abstract") == 0)))
{
- return false;
+ mError = false;
}
}
if ( parserError.getErrorType() == GeneratedSaxParser::ParserError::ERROR_COULD_NOT_OPEN_FILE)
{
std::cout << "Couldn't open file" << std::endl;
- mError = true;
}
std::cout << "Schema validation error: " << parserError.getErrorMessage() << std::endl;
- mError = true;
}
else if ( error->getErrorClass() == COLLADASaxFWL::IError::ERROR_SAXFWL )
{
COLLADASaxFWL::SaxFWLError* saxFWLError = (COLLADASaxFWL::SaxFWLError*) error;
std::cout << "Sax FWL Error: " << saxFWLError->getErrorMessage() << std::endl;
- mError = true;
}
return false;
}