mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
SourceReferenceFormatter: Support full range of options in formatErrorInformation()
This commit is contained in:
@@ -85,12 +85,10 @@ std::optional<Error> parseAndReturnFirstError(
|
||||
if (_allowWarnings && e->type() == Error::Type::Warning)
|
||||
continue;
|
||||
if (error)
|
||||
{
|
||||
string errors;
|
||||
for (auto const& err: stack.errors())
|
||||
errors += SourceReferenceFormatter::formatErrorInformation(*err, stack);
|
||||
BOOST_FAIL("Found more than one error:\n" + errors);
|
||||
}
|
||||
BOOST_FAIL(
|
||||
"Found more than one error:\n" +
|
||||
SourceReferenceFormatter::formatErrorInformation(stack.errors(), stack)
|
||||
);
|
||||
error = e;
|
||||
}
|
||||
if (!success)
|
||||
|
||||
@@ -42,11 +42,10 @@ optional<CompilerOutput> SolidityCompilationFramework::compileContract()
|
||||
if (m_compilerInput.debugFailure)
|
||||
{
|
||||
cerr << "Compiling contract failed" << endl;
|
||||
for (auto const& error: m_compiler.errors())
|
||||
cerr << SourceReferenceFormatter::formatErrorInformation(
|
||||
*error,
|
||||
m_compiler
|
||||
);
|
||||
cerr << SourceReferenceFormatter::formatErrorInformation(
|
||||
m_compiler.errors(),
|
||||
m_compiler
|
||||
);
|
||||
}
|
||||
return {};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user