From: Richard Heck Date: Sun, 18 Apr 2010 20:42:04 +0000 (+0000) Subject: A little more cleanup. X-Git-Tag: 2.0.0~3418 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=6d7cffbd71185035c209bb5291bb39dce157bb98;p=features.git A little more cleanup. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34205 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/TextClass.cpp b/src/TextClass.cpp index a6ba7c9298..6524ecb77c 100644 --- a/src/TextClass.cpp +++ b/src/TextClass.cpp @@ -406,8 +406,7 @@ TextClass::ReturnValues TextClass::read(Lexer & lexrc, ReadType rt) lexrc.printError("Could not find input file: " + inc); error = true; } else if (!read(tmp, MERGE)) { - lexrc.printError("Error reading input" - "file: " + tmp.absFilename()); + lexrc.printError("Error reading input file: " + tmp.absFilename()); error = true; } } @@ -683,16 +682,18 @@ TextClass::ReturnValues TextClass::read(Lexer & lexrc, ReadType rt) break; } // end of switch - //Note that this is triggered the first time through the loop unless - //we hit a format tag. + // Note that this is triggered the first time through the loop unless + // we hit a format tag. if (format != FORMAT) - break; + return FORMAT_MISMATCH; } - if (format != FORMAT) - return FORMAT_MISMATCH; + // at present, we abort if we encounter an error, + // so there is no point continuing. + if (error) + return ERROR; - if (rt != BASECLASS) + if (rt != BASECLASS) return (error ? ERROR : OK); if (defaultlayout_.empty()) {