Catch internal error during whole program analysis

This commit is contained in:
Daniel Marjamäki 2022-07-07 19:14:18 +02:00
parent d1812c8022
commit e1d3e6f72e
1 changed files with 6 additions and 1 deletions

View File

@ -1432,7 +1432,12 @@ void CppCheck::executeAddonsWholeProgram(const std::map<std::string, std::size_t
ctuInfoFiles.push_back(getCtuInfoFileName(dumpFileName));
}
try {
executeAddons(ctuInfoFiles);
catch (const InternalError& e) {
internalError("", "Internal error during whole program analysis: " + std::string(e.what()));
mExitCode = 1;
}
for (const std::string &f: ctuInfoFiles) {
std::remove(f.c_str());