From 95ad87267878a168dba98d5eb16e27dc9632465d Mon Sep 17 00:00:00 2001 From: LianaHus Date: Wed, 14 Oct 2015 20:27:30 +0200 Subject: added Error class for all kind of errors Conflicts: libsolidity/Exceptions.h Conflicts: libsolidity/ReferencesResolver.cpp --- libsolidity/ReferencesResolver.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libsolidity/ReferencesResolver.cpp b/libsolidity/ReferencesResolver.cpp index 32c1728f..70bc6572 100644 --- a/libsolidity/ReferencesResolver.cpp +++ b/libsolidity/ReferencesResolver.cpp @@ -57,10 +57,10 @@ bool ReferencesResolver::visit(UserDefinedTypeName const& _typeName) Declaration const* declaration = m_resolver.pathFromCurrentScope(_typeName.namePath()); if (!declaration) BOOST_THROW_EXCEPTION( - DeclarationError() << + Error(Error::Type::DeclarationError) << errinfo_sourceLocation(_typeName.location()) << errinfo_comment("Identifier not found or not unique.") - ); + _typeName.annotation().referencedDeclaration = declaration; return true; } @@ -70,7 +70,7 @@ bool ReferencesResolver::visit(Identifier const& _identifier) auto declarations = m_resolver.nameFromCurrentScope(_identifier.name()); if (declarations.empty()) BOOST_THROW_EXCEPTION( - DeclarationError() << + Error(Error::Type::DeclarationError) << errinfo_sourceLocation(_identifier.location()) << errinfo_comment("Undeclared identifier.") ); -- cgit v1.2.3