mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #6484 from sifmelcara/create-SourceReferenceFormatter-shortcut
Add a shortcut for formatting error information
This commit is contained in:
@@ -53,10 +53,7 @@ pair<string, string> IRGenerator::run(ContractDefinition const& _contract)
|
||||
{
|
||||
string errorMessage;
|
||||
for (auto const& error: asmStack.errors())
|
||||
errorMessage += langutil::SourceReferenceFormatter::formatExceptionInformation(
|
||||
*error,
|
||||
(error->type() == langutil::Error::Type::Warning) ? "Warning" : "Error"
|
||||
);
|
||||
errorMessage += langutil::SourceReferenceFormatter::formatErrorInformation(*error);
|
||||
solAssert(false, "Invalid IR generated:\n" + errorMessage + "\n" + ir);
|
||||
}
|
||||
asmStack.optimize();
|
||||
|
||||
Reference in New Issue
Block a user