aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/NameAndTypeResolver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libsolidity/NameAndTypeResolver.cpp')
-rw-r--r--libsolidity/NameAndTypeResolver.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/libsolidity/NameAndTypeResolver.cpp b/libsolidity/NameAndTypeResolver.cpp
index abf0788a..edd0704d 100644
--- a/libsolidity/NameAndTypeResolver.cpp
+++ b/libsolidity/NameAndTypeResolver.cpp
@@ -49,8 +49,10 @@ bool NameAndTypeResolver::registerDeclarations(SourceUnit& _sourceUnit)
{
DeclarationRegistrationHelper registrar(m_scopes, _sourceUnit, m_errors);
}
- catch (FatalError)
+ catch (FatalError const& _e)
{
+ if (m_errors.empty())
+ throw; // Something is weird here, rather throw again.
return false;
}
return true;
@@ -124,6 +126,8 @@ bool NameAndTypeResolver::resolveNamesAndTypes(ContractDefinition& _contract)
}
catch (FatalError const& _e)
{
+ if (m_errors.empty())
+ throw; // Something is weird here, rather throw again.
return false;
}
return true;
@@ -136,8 +140,10 @@ bool NameAndTypeResolver::updateDeclaration(Declaration const& _declaration)
m_scopes[nullptr].registerDeclaration(_declaration, false, true);
solAssert(_declaration.scope() == nullptr, "Updated declaration outside global scope.");
}
- catch(FatalError const& _error)
+ catch (FatalError const& _error)
{
+ if (m_errors.empty())
+ throw; // Something is weird here, rather throw again.
return false;
}
return true;