aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity
diff options
context:
space:
mode:
Diffstat (limited to 'libsolidity')
-rw-r--r--libsolidity/interface/CompilerStack.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/libsolidity/interface/CompilerStack.cpp b/libsolidity/interface/CompilerStack.cpp
index dded81f5..dd518860 100644
--- a/libsolidity/interface/CompilerStack.cpp
+++ b/libsolidity/interface/CompilerStack.cpp
@@ -184,10 +184,10 @@ bool CompilerStack::parse()
{
const ContractDefinition* existingContract = m_contracts.find(contract->name())->second.contract;
if (contract != existingContract)
- BOOST_THROW_EXCEPTION(CompilerError() <<
+ BOOST_THROW_EXCEPTION(DeclarationError() <<
errinfo_sourceLocation(contract->location()) <<
- errinfo_comment(contract->name() + " is already defined at "
- + *(existingContract->location().sourceName)));
+ errinfo_comment(contract->name() + " is already defined.") <<
+ errinfo_secondarySourceLocation(SecondarySourceLocation().append(existingContract->location()), "Previous definition is here:"));
}
m_contracts[contract->name()].contract = contract;
}