mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Tidy up the error message
This commit is contained in:
parent
b24ca4fa23
commit
ce3082dec2
@ -184,10 +184,10 @@ bool CompilerStack::parse()
|
|||||||
{
|
{
|
||||||
const ContractDefinition* existingContract = m_contracts.find(contract->name())->second.contract;
|
const ContractDefinition* existingContract = m_contracts.find(contract->name())->second.contract;
|
||||||
if (contract != existingContract)
|
if (contract != existingContract)
|
||||||
BOOST_THROW_EXCEPTION(CompilerError() <<
|
BOOST_THROW_EXCEPTION(DeclarationError() <<
|
||||||
errinfo_sourceLocation(contract->location()) <<
|
errinfo_sourceLocation(contract->location()) <<
|
||||||
errinfo_comment(contract->name() + " is already defined at "
|
errinfo_comment(contract->name() + " is already defined.") <<
|
||||||
+ *(existingContract->location().sourceName)));
|
errinfo_secondarySourceLocation(SecondarySourceLocation().append(existingContract->location()), "Previous definition is here:"));
|
||||||
}
|
}
|
||||||
m_contracts[contract->name()].contract = contract;
|
m_contracts[contract->name()].contract = contract;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user