diff options
Diffstat (limited to 'source/blender/collada/ErrorHandler.cpp')
-rw-r--r-- | source/blender/collada/ErrorHandler.cpp | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/source/blender/collada/ErrorHandler.cpp b/source/blender/collada/ErrorHandler.cpp index 530158ed418..1c0f40d2185 100644 --- a/source/blender/collada/ErrorHandler.cpp +++ b/source/blender/collada/ErrorHandler.cpp @@ -49,31 +49,37 @@ bool ErrorHandler::handleError( const COLLADASaxFWL::IError* error ) { mError = true; - if ( error->getErrorClass() == COLLADASaxFWL::IError::ERROR_SAXPARSER ) { + if ( error->getErrorClass() == COLLADASaxFWL::IError::ERROR_SAXPARSER ) + { COLLADASaxFWL::SaxParserError* saxParserError = (COLLADASaxFWL::SaxParserError*) error; const GeneratedSaxParser::ParserError& parserError = saxParserError->getError(); // Workaround to avoid wrong error - if ( parserError.getErrorType() == GeneratedSaxParser::ParserError::ERROR_VALIDATION_MIN_OCCURS_UNMATCHED) { - if ( strcmp(parserError.getElement(), "effect") == 0 ) { + if ( parserError.getErrorType() == GeneratedSaxParser::ParserError::ERROR_VALIDATION_MIN_OCCURS_UNMATCHED) + { + if ( strcmp(parserError.getElement(), "effect") == 0 ) + { 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 ( 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))) { mError = false; } } - if ( parserError.getErrorType() == GeneratedSaxParser::ParserError::ERROR_COULD_NOT_OPEN_FILE) { + if ( parserError.getErrorType() == GeneratedSaxParser::ParserError::ERROR_COULD_NOT_OPEN_FILE) + { std::cout << "Couldn't open file" << std::endl; } std::cout << "Schema validation error: " << parserError.getErrorMessage() << std::endl; } - else if ( error->getErrorClass() == COLLADASaxFWL::IError::ERROR_SAXFWL ) { + else if ( error->getErrorClass() == COLLADASaxFWL::IError::ERROR_SAXFWL ) + { COLLADASaxFWL::SaxFWLError* saxFWLError = (COLLADASaxFWL::SaxFWLError*) error; std::cout << "Sax FWL Error: " << saxFWLError->getErrorMessage() << std::endl; } |