mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
added Error class for all kind of errors
Conflicts: libsolidity/Exceptions.h Conflicts: libsolidity/ReferencesResolver.cpp
This commit is contained in:
parent
e11e10f817
commit
95ad872678
@ -57,10 +57,10 @@ bool ReferencesResolver::visit(UserDefinedTypeName const& _typeName)
|
|||||||
Declaration const* declaration = m_resolver.pathFromCurrentScope(_typeName.namePath());
|
Declaration const* declaration = m_resolver.pathFromCurrentScope(_typeName.namePath());
|
||||||
if (!declaration)
|
if (!declaration)
|
||||||
BOOST_THROW_EXCEPTION(
|
BOOST_THROW_EXCEPTION(
|
||||||
DeclarationError() <<
|
Error(Error::Type::DeclarationError) <<
|
||||||
errinfo_sourceLocation(_typeName.location()) <<
|
errinfo_sourceLocation(_typeName.location()) <<
|
||||||
errinfo_comment("Identifier not found or not unique.")
|
errinfo_comment("Identifier not found or not unique.")
|
||||||
);
|
|
||||||
_typeName.annotation().referencedDeclaration = declaration;
|
_typeName.annotation().referencedDeclaration = declaration;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -70,7 +70,7 @@ bool ReferencesResolver::visit(Identifier const& _identifier)
|
|||||||
auto declarations = m_resolver.nameFromCurrentScope(_identifier.name());
|
auto declarations = m_resolver.nameFromCurrentScope(_identifier.name());
|
||||||
if (declarations.empty())
|
if (declarations.empty())
|
||||||
BOOST_THROW_EXCEPTION(
|
BOOST_THROW_EXCEPTION(
|
||||||
DeclarationError() <<
|
Error(Error::Type::DeclarationError) <<
|
||||||
errinfo_sourceLocation(_identifier.location()) <<
|
errinfo_sourceLocation(_identifier.location()) <<
|
||||||
errinfo_comment("Undeclared identifier.")
|
errinfo_comment("Undeclared identifier.")
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user