added Error class for all kind of errors

Conflicts:
	libsolidity/Exceptions.h

Conflicts:
	libsolidity/ReferencesResolver.cpp
This commit is contained in:
LianaHus 2015-10-14 20:27:30 +02:00
parent e11e10f817
commit 95ad872678

View File

@ -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.")
);