aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRhett Aultman <roadriverrail@gmail.com>2016-11-28 10:46:44 +0800
committerRhett Aultman <rhett.aultman@meraki.net>2017-01-17 01:32:57 +0800
commitce3082dec2178273d4913a6f9df909c0aca8ef5a (patch)
tree40409fa99bda776a8568ced5ddb99e063eee53ac
parentb24ca4fa236ccc89600d30206172baf3eee386a7 (diff)
downloaddexon-solidity-ce3082dec2178273d4913a6f9df909c0aca8ef5a.tar.gz
dexon-solidity-ce3082dec2178273d4913a6f9df909c0aca8ef5a.tar.zst
dexon-solidity-ce3082dec2178273d4913a6f9df909c0aca8ef5a.zip
Tidy up the error message
-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;
}