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/AST.h | |
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/AST.h')
-rw-r--r-- | libsolidity/AST.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/libsolidity/AST.h b/libsolidity/AST.h index f257dfb2..9dd67cc2 100644 --- a/libsolidity/AST.h +++ b/libsolidity/AST.h @@ -75,7 +75,7 @@ public: /// Creates a @ref TypeError exception and decorates it with the location of the node and /// the given description - TypeError createTypeError(std::string const& _description) const; + Error createTypeError(std::string const& _description) const; ///@todo make this const-safe by providing a different way to access the annotation virtual ASTAnnotation& annotation() const; @@ -660,10 +660,14 @@ class MagicVariableDeclaration: public Declaration public: MagicVariableDeclaration(ASTString const& _name, std::shared_ptr<Type const> const& _type): Declaration(SourceLocation(), std::make_shared<ASTString>(_name)), m_type(_type) {} - virtual void accept(ASTVisitor&) override { BOOST_THROW_EXCEPTION(InternalCompilerError() - << errinfo_comment("MagicVariableDeclaration used inside real AST.")); } - virtual void accept(ASTConstVisitor&) const override { BOOST_THROW_EXCEPTION(InternalCompilerError() - << errinfo_comment("MagicVariableDeclaration used inside real AST.")); } + virtual void accept(ASTVisitor&) override + { + BOOST_THROW_EXCEPTION(InternalCompilerError() << errinfo_comment("MagicVariableDeclaration used inside real AST.")); + } + virtual void accept(ASTConstVisitor&) const override + { + BOOST_THROW_EXCEPTION(InternalCompilerError() << errinfo_comment("MagicVariableDeclaration used inside real AST.")); + } virtual TypePointer type(ContractDefinition const*) const override { return m_type; } |