Catch FatalError in CompilerStack::analysis to cover all the analysis tests

This commit is contained in:
Alex Beregszaszi committed 2018-04-06 13:52:19 +02:00
1 parent d5f40c141b
commit e8be0e61b3
2 files changed
+11 -11

No files matched your search

+10
View File
@@ -164,6 +164,8 @@ bool CompilerStack::analyze()
resolveImports();
bool noErrors = true;
try {
SyntaxChecker syntaxChecker(m_errorReporter);
for (Source const* source: m_sourceOrder)
if (!syntaxChecker.checkSyntax(*source->ast))
@@ -245,6 +247,14 @@ bool CompilerStack::analyze()
smtChecker.analyze(*source->ast);
}
}
catch(FatalError const&)
{
if (m_errorReporter.errors().empty())
throw; // Something is weird here, rather throw again.
noErrors = false;
}
if (noErrors)
{
m_stackState = AnalysisSuccessful;