diff options
Diffstat (limited to 'libsolidity/interface/CompilerStack.cpp')
-rw-r--r-- | libsolidity/interface/CompilerStack.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libsolidity/interface/CompilerStack.cpp b/libsolidity/interface/CompilerStack.cpp index eacfca9c..e7cdb742 100644 --- a/libsolidity/interface/CompilerStack.cpp +++ b/libsolidity/interface/CompilerStack.cpp @@ -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; |