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:
authorNathan Letwory <nathan@letworyinteractive.com>2011-09-12 14:57:41 +0400
committerNathan Letwory <nathan@letworyinteractive.com>2011-09-12 14:57:41 +0400
commit4a9a0ec3e45c3870771e8dd44c62a05cf0d4d2d1 (patch)
treea61eedf00b814af0f4b0f0881b55e31348cb756d /source/blender/collada/ErrorHandler.cpp
parent46aede579e15b4106b0a342dbb7f3b6ea5f088d2 (diff)
Code shuffle so function has only one exit point.
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;
}