aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/NameAndTypeResolver.cpp
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2015-10-16 20:52:01 +0800
committerchriseth <c@ethdev.com>2015-10-16 20:52:01 +0800
commit7b56206a9809c12d9c6e94a0f1dd43f40506c9b5 (patch)
tree9f32c0bfa6c32fa341ebd112db4c32fddc732b53 /libsolidity/NameAndTypeResolver.cpp
parent52eaa477d4bd9ad2f591148727d1ac9fd500d283 (diff)
downloaddexon-solidity-7b56206a9809c12d9c6e94a0f1dd43f40506c9b5.tar
dexon-solidity-7b56206a9809c12d9c6e94a0f1dd43f40506c9b5.tar.gz
dexon-solidity-7b56206a9809c12d9c6e94a0f1dd43f40506c9b5.tar.bz2
dexon-solidity-7b56206a9809c12d9c6e94a0f1dd43f40506c9b5.tar.lz
dexon-solidity-7b56206a9809c12d9c6e94a0f1dd43f40506c9b5.tar.xz
dexon-solidity-7b56206a9809c12d9c6e94a0f1dd43f40506c9b5.tar.zst
dexon-solidity-7b56206a9809c12d9c6e94a0f1dd43f40506c9b5.zip
Do not catch InternalCompilerErrors as part of fatal error handling.
InternalCompilerErrors always have to end the whole compilation process because a serious inconsistency was detected.
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;