aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/interface
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2018-04-05 20:23:36 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2018-04-06 19:52:19 +0800
commite8be0e61b395c61a836e018861cc3fdec10f6a8a (patch)
treea6ba819670589b75a90cae96f60b523e00fa62c7 /libsolidity/interface
parentd5f40c141b203eb12c4d6fa97418b1a8f0f789bd (diff)
downloaddexon-solidity-e8be0e61b395c61a836e018861cc3fdec10f6a8a.tar
dexon-solidity-e8be0e61b395c61a836e018861cc3fdec10f6a8a.tar.gz
dexon-solidity-e8be0e61b395c61a836e018861cc3fdec10f6a8a.tar.bz2
dexon-solidity-e8be0e61b395c61a836e018861cc3fdec10f6a8a.tar.lz
dexon-solidity-e8be0e61b395c61a836e018861cc3fdec10f6a8a.tar.xz
dexon-solidity-e8be0e61b395c61a836e018861cc3fdec10f6a8a.tar.zst
dexon-solidity-e8be0e61b395c61a836e018861cc3fdec10f6a8a.zip
Catch FatalError in CompilerStack::analysis to cover all the analysis tests
Diffstat (limited to 'libsolidity/interface')
-rw-r--r--libsolidity/interface/CompilerStack.cpp10
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;