style cleanup: changes to brace placement / newlines - for/while/if/switch
This commit is contained in:
@@ -49,37 +49,31 @@ 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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user