Skip to content

Commit 3772f55

Browse files
committed
Check for license error in skipAnalysis
1 parent 3181f13 commit 3772f55

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

lib/analyzerinfo.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,13 @@ static bool skipAnalysis(const std::string &analyzerInfoFile, std::size_t hash,
9898
if (!attr || attr != std::to_string(hash))
9999
return false;
100100

101+
// Check for invalid license error, in which case we should retry analysis
102+
// Any kind of internal error should be checked for here
103+
for (const tinyxml2::XMLElement *e = rootNode->FirstChildElement(); e; e = e->NextSiblingElement()) {
104+
if (std::strcmp(e->Name(), "error") == 0 && e->Attribute("id", "premium-invalidLicense"))
105+
return false;
106+
}
107+
101108
for (const tinyxml2::XMLElement *e = rootNode->FirstChildElement(); e; e = e->NextSiblingElement()) {
102109
if (std::strcmp(e->Name(), "error") == 0)
103110
errors.emplace_back(e);

0 commit comments

Comments
 (0)