#8585 --check-config aborts due to unhandled simplecpp::Output exception

This commit is contained in:
amai2012 2018-05-17 08:59:10 +02:00
parent 2320034f4a
commit 7062df5d78
1 changed files with 3 additions and 0 deletions

View File

@ -482,6 +482,9 @@ unsigned int CppCheck::checkFile(const std::string& filename, const std::string
} catch (const InternalError &e) { } catch (const InternalError &e) {
internalError(filename, e.errorMessage); internalError(filename, e.errorMessage);
exitcode=1; // e.g. reflect a syntax error exitcode=1; // e.g. reflect a syntax error
} catch (const simplecpp::Output &o) {
internalError(std::string(o.location.file() + ':' + MathLib::toString(o.location.line)), o.msg);
exitcode=1; // e.g. reflect an error during preprocessing
} }
analyzerInformation.setFileInfo("CheckUnusedFunctions", checkUnusedFunctions.analyzerInfo()); analyzerInformation.setFileInfo("CheckUnusedFunctions", checkUnusedFunctions.analyzerInfo());