Merge pull request #2334 from ethereum/printMultiError

Print information about types of errors.
This commit is contained in:
Alex Beregszaszi 2017-07-19 21:25:36 +01:00 committed by GitHub
commit 6d6d4f6907

View File

@ -112,7 +112,14 @@ parseAnalyseAndReturnError(string const& _source, bool _reportWarnings = false,
) )
{ {
if (error && !_allowMultipleErrors) if (error && !_allowMultipleErrors)
BOOST_FAIL("Multiple errors found"); {
string message("Multiple errors found: ");
for (auto const& e: errorReporter.errors())
if (string const* description = boost::get_error_info<errinfo_comment>(*e))
message += *description + ", ";
BOOST_FAIL(message);
}
if (!error) if (!error)
error = currentError; error = currentError;
} }