Catch internal error during whole program analysis

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

View File

@ -1435,7 +1435,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());