diff options
author | LianaHus <liana@ethdev.com> | 2015-10-02 20:41:40 +0800 |
---|---|---|
committer | LianaHus <liana@ethdev.com> | 2015-10-15 02:27:41 +0800 |
commit | 742e5b259a8c88e69f09ede7312673157cd77a1f (patch) | |
tree | 7d1d44995676d828e216078be7803e80cfaf7d0d /libsolidity/NameAndTypeResolver.cpp | |
parent | 95ad87267878a168dba98d5eb16e27dc9632465d (diff) | |
download | dexon-solidity-742e5b259a8c88e69f09ede7312673157cd77a1f.tar dexon-solidity-742e5b259a8c88e69f09ede7312673157cd77a1f.tar.gz dexon-solidity-742e5b259a8c88e69f09ede7312673157cd77a1f.tar.bz2 dexon-solidity-742e5b259a8c88e69f09ede7312673157cd77a1f.tar.lz dexon-solidity-742e5b259a8c88e69f09ede7312673157cd77a1f.tar.xz dexon-solidity-742e5b259a8c88e69f09ede7312673157cd77a1f.tar.zst dexon-solidity-742e5b259a8c88e69f09ede7312673157cd77a1f.zip |
added Error class for all kind of errors
Conflicts:
libsolidity/Exceptions.h
Diffstat (limited to 'libsolidity/NameAndTypeResolver.cpp')
-rw-r--r-- | libsolidity/NameAndTypeResolver.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libsolidity/NameAndTypeResolver.cpp b/libsolidity/NameAndTypeResolver.cpp index 0d2c3b02..3591c07a 100644 --- a/libsolidity/NameAndTypeResolver.cpp +++ b/libsolidity/NameAndTypeResolver.cpp @@ -33,8 +33,10 @@ namespace solidity { NameAndTypeResolver::NameAndTypeResolver( - vector<Declaration const*> const& _globals -) + vector<Declaration const*> const& _globals, + ErrorList& _errors +) : + m_errors(_errors) { for (Declaration const* declaration: _globals) m_scopes[nullptr].registerDeclaration(*declaration); @@ -163,7 +165,7 @@ vector<Declaration const*> NameAndTypeResolver::cleanedDeclarations( for (auto parameter: functionType.parameterTypes() + functionType.returnParameterTypes()) if (!parameter) BOOST_THROW_EXCEPTION( - DeclarationError() << + Error(Error::Type::DeclarationError) << errinfo_sourceLocation(_identifier.location()) << errinfo_comment("Function type can not be used in this context") ); @@ -408,7 +410,7 @@ void DeclarationRegistrationHelper::registerDeclaration(Declaration& _declaratio } BOOST_THROW_EXCEPTION( - DeclarationError() << + Error(Error::Type::DeclarationError) << errinfo_sourceLocation(secondDeclarationLocation) << errinfo_comment("Identifier already declared.") << errinfo_secondarySourceLocation( |