Skip to content

Commit e1d3e6f

Browse files
committed
Catch internal error during whole program analysis
1 parent d1812c8 commit e1d3e6f

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

lib/cppcheck.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1432,7 +1432,12 @@ void CppCheck::executeAddonsWholeProgram(const std::map<std::string, std::size_t
14321432
ctuInfoFiles.push_back(getCtuInfoFileName(dumpFileName));
14331433
}
14341434

1435-
executeAddons(ctuInfoFiles);
1435+
try {
1436+
executeAddons(ctuInfoFiles);
1437+
catch (const InternalError& e) {
1438+
internalError("", "Internal error during whole program analysis: " + std::string(e.what()));
1439+
mExitCode = 1;
1440+
}
14361441

14371442
for (const std::string &f: ctuInfoFiles) {
14381443
std::remove(f.c_str());

0 commit comments

Comments
 (0)