aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-05-24 20:27:58 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2017-05-24 20:35:52 +0800
commit338202ea96e0af8822dde3acc27aa45f79c8780b (patch)
tree404fd5f4f71b470c7172a36d2fc35ffbe601b2b1
parent130f7419fb4b7d40a212454fe870e9e135813bf1 (diff)
downloaddexon-solidity-338202ea96e0af8822dde3acc27aa45f79c8780b.tar.gz
dexon-solidity-338202ea96e0af8822dde3acc27aa45f79c8780b.tar.zst
dexon-solidity-338202ea96e0af8822dde3acc27aa45f79c8780b.zip
Uniform error messages
-rw-r--r--libsolidity/inlineasm/AsmParser.cpp7
-rw-r--r--test/libsolidity/InlineAssembly.cpp2
2 files changed, 5 insertions, 4 deletions
diff --git a/libsolidity/inlineasm/AsmParser.cpp b/libsolidity/inlineasm/AsmParser.cpp
index 519bfa2e..530cd726 100644
--- a/libsolidity/inlineasm/AsmParser.cpp
+++ b/libsolidity/inlineasm/AsmParser.cpp
@@ -324,10 +324,11 @@ assembly::Statement Parser::parseCall(assembly::Statement&& _instruction)
/// check for premature closing parentheses
if (m_scanner->currentToken() == Token::RParen)
fatalParserError(string(
- "Expected " +
+ "Expected expression (" +
+ instrInfo.name +
+ " expects " +
boost::lexical_cast<string>(args) +
- " arguments, but received " +
- boost::lexical_cast<string>(i)
+ " arguments)"
));
ret.arguments.emplace_back(parseExpression());
diff --git a/test/libsolidity/InlineAssembly.cpp b/test/libsolidity/InlineAssembly.cpp
index 6ab2a12d..61892761 100644
--- a/test/libsolidity/InlineAssembly.cpp
+++ b/test/libsolidity/InlineAssembly.cpp
@@ -272,7 +272,7 @@ BOOST_AUTO_TEST_CASE(invalid_tuple_assignment)
BOOST_AUTO_TEST_CASE(instruction_too_few_arguments)
{
- CHECK_PARSE_ERROR("{ mul() }", ParserError, "Expected 2 arguments, but received 0");
+ CHECK_PARSE_ERROR("{ mul() }", ParserError, "Expected expression (MUL expects 2 arguments)");
CHECK_PARSE_ERROR("{ mul(1) }", ParserError, "Expected comma (MUL expects 2 arguments)");
}