mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Use printErrorInformation() over printExceptionInformation() where possible
This commit is contained in:
parent
4020552e1d
commit
a59fc39f10
@ -52,6 +52,10 @@ public:
|
||||
m_withErrorIds(_withErrorIds)
|
||||
{}
|
||||
|
||||
// WARNING: Use the xyzErrorInformation() variants over xyzExceptionInformation() when you
|
||||
// do have access to an Error instance. Error is implicitly convertible to util::Exception
|
||||
// but the conversion loses the error ID.
|
||||
|
||||
/// Prints source location if it is given.
|
||||
void printSourceLocation(SourceReference const& _ref);
|
||||
void printExceptionInformation(SourceReferenceExtractor::Message const& _msg);
|
||||
|
@ -827,7 +827,7 @@ void CommandLineInterface::compile()
|
||||
else
|
||||
{
|
||||
m_hasOutput = true;
|
||||
formatter.printExceptionInformation(_error, Error::errorSeverity(_error.type()));
|
||||
formatter.printErrorInformation(_error);
|
||||
solThrow(CommandLineExecutionError, "");
|
||||
}
|
||||
}
|
||||
|
@ -77,10 +77,7 @@ DEFINE_PROTO_FUZZER(Program const& _input)
|
||||
Error::containsErrors(stack.errors())
|
||||
)
|
||||
{
|
||||
SourceReferenceFormatter formatter(std::cout, stack, false, false);
|
||||
|
||||
for (auto const& error: stack.errors())
|
||||
formatter.printExceptionInformation(*error, Error::errorSeverity(error->type()));
|
||||
SourceReferenceFormatter{std::cout, stack, false, false}.printErrorInformation(stack.errors());
|
||||
yulAssert(false, "Proto fuzzer generated malformed program");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user