mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Only use SourceReferenceFormatterHuman
This commit is contained in:
committed by
chriseth
parent
1126838a31
commit
1dedba8538
@@ -45,7 +45,7 @@
|
||||
|
||||
#include <liblangutil/ErrorReporter.h>
|
||||
#include <liblangutil/Scanner.h>
|
||||
#include <liblangutil/SourceReferenceFormatter.h>
|
||||
#include <liblangutil/SourceReferenceFormatterHuman.h>
|
||||
|
||||
#include <boost/algorithm/string/replace.hpp>
|
||||
|
||||
@@ -460,7 +460,7 @@ void CompilerContext::appendInlineAssembly(
|
||||
_assembly + "\n"
|
||||
"------------------ Errors: ----------------\n";
|
||||
for (auto const& error: errorReporter.errors())
|
||||
message += SourceReferenceFormatter::formatErrorInformation(*error);
|
||||
message += SourceReferenceFormatterHuman::formatErrorInformation(*error);
|
||||
message += "-------------------------------------------\n";
|
||||
|
||||
solAssert(false, message);
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
#include <libsolutil/Whiskers.h>
|
||||
#include <libsolutil/StringUtils.h>
|
||||
|
||||
#include <liblangutil/SourceReferenceFormatter.h>
|
||||
#include <liblangutil/SourceReferenceFormatterHuman.h>
|
||||
|
||||
#include <boost/range/adaptor/map.hpp>
|
||||
|
||||
@@ -60,7 +60,7 @@ pair<string, string> IRGenerator::run(
|
||||
{
|
||||
string errorMessage;
|
||||
for (auto const& error: asmStack.errors())
|
||||
errorMessage += langutil::SourceReferenceFormatter::formatErrorInformation(*error);
|
||||
errorMessage += langutil::SourceReferenceFormatterHuman::formatErrorInformation(*error);
|
||||
solAssert(false, ir + "\n\nInvalid IR generated:\n" + errorMessage + "\n");
|
||||
}
|
||||
asmStack.optimize();
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include <libyul/AssemblyStack.h>
|
||||
#include <libyul/Exceptions.h>
|
||||
#include <libyul/optimiser/Suite.h>
|
||||
#include <liblangutil/SourceReferenceFormatter.h>
|
||||
#include <liblangutil/SourceReferenceFormatterHuman.h>
|
||||
#include <libevmasm/Instruction.h>
|
||||
#include <libsmtutil/Exceptions.h>
|
||||
#include <libsolutil/JSON.h>
|
||||
@@ -117,7 +117,8 @@ Json::Value formatErrorWithException(
|
||||
)
|
||||
{
|
||||
string message;
|
||||
string formattedMessage = SourceReferenceFormatter::formatExceptionInformation(_exception, _type);
|
||||
// TODO: consider enabling color
|
||||
string formattedMessage = SourceReferenceFormatterHuman::formatExceptionInformation(_exception, _type);
|
||||
|
||||
if (string const* description = boost::get_error_info<util::errinfo_comment>(_exception))
|
||||
message = ((_message.length() > 0) ? (_message + ":") : "") + *description;
|
||||
|
||||
Reference in New Issue
Block a user