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:
authorGaia Clary <gaia.clary@machinimatrix.org>2014-12-22 15:26:15 +0300
committerGaia Clary <gaia.clary@machinimatrix.org>2014-12-22 15:26:35 +0300
commitf78490182efc5d4c1145321f449cbd0d7fb08bb6 (patch)
tree3ec1467ce7f7dc453df282aa84d32ab2776b73a1 /source/blender/collada
parentabf39fa31fcf807a400ecd232e7b2b6ce6eee7d4 (diff)
partial revert ab6417aa9ff8cbd4831c3ed1837742c1178be25a was too strict
Diffstat (limited to 'source/blender/collada')
-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 f6f6a0f0904..854e8abd76d 100644
--- a/source/blender/collada/ErrorHandler.cpp
+++ b/source/blender/collada/ErrorHandler.cpp
@@ -47,7 +47,7 @@ ErrorHandler::~ErrorHandler()
//--------------------------------------------------------------------
bool ErrorHandler::handleError(const COLLADASaxFWL::IError *error)
{
- bool pass = false;
+ bool isError = true;
if (error->getErrorClass() == COLLADASaxFWL::IError::ERROR_SAXPARSER) {
COLLADASaxFWL::SaxParserError *saxParserError = (COLLADASaxFWL::SaxParserError *) error;
@@ -56,14 +56,14 @@ bool ErrorHandler::handleError(const COLLADASaxFWL::IError *error)
// Workaround to avoid wrong error
if (parserError.getErrorType() == GeneratedSaxParser::ParserError::ERROR_VALIDATION_MIN_OCCURS_UNMATCHED) {
if (strcmp(parserError.getElement(), "effect") == 0) {
- pass = true;
+ isError = 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)))
{
- pass = true;
+ isError = false;
}
}
@@ -80,7 +80,7 @@ bool ErrorHandler::handleError(const COLLADASaxFWL::IError *error)
* This makes the importer more gracefull, so it now imports what makes sense.
*/
if (saxFWLError->getSeverity() == COLLADASaxFWL::IError::SEVERITY_ERROR_NONCRITICAL) {
- pass = true;
+ isError = false;
}
std::cout << "Sax FWL Error: " << saxFWLError->getErrorMessage() << std::endl;
@@ -89,8 +89,7 @@ bool ErrorHandler::handleError(const COLLADASaxFWL::IError *error)
std::cout << "opencollada error: " << error->getFullErrorMessage() << std::endl;
}
- if (!pass)
- mError = true;
+ mError |= isError;
- return pass;
+ return false; // let OpenCollada decide when to abort
}