mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
AnalysisFramework.formatErrors(): Fix _withErrorIds flag not having any effect
This commit is contained in:
parent
a59fc39f10
commit
339053f185
@ -147,15 +147,17 @@ ErrorList AnalysisFramework::expectError(std::string const& _source, bool _warni
|
||||
}
|
||||
|
||||
string AnalysisFramework::formatErrors(
|
||||
langutil::ErrorList _errors,
|
||||
langutil::ErrorList const& _errors,
|
||||
bool _colored,
|
||||
bool _withErrorIds
|
||||
) const
|
||||
{
|
||||
string message;
|
||||
for (auto const& error: _errors)
|
||||
message += formatError(*error, _colored, _withErrorIds);
|
||||
return message;
|
||||
return SourceReferenceFormatter::formatErrorInformation(
|
||||
_errors,
|
||||
*m_compiler,
|
||||
_colored,
|
||||
_withErrorIds
|
||||
);
|
||||
}
|
||||
|
||||
string AnalysisFramework::formatError(
|
||||
@ -164,9 +166,8 @@ string AnalysisFramework::formatError(
|
||||
bool _withErrorIds
|
||||
) const
|
||||
{
|
||||
return SourceReferenceFormatter::formatExceptionInformation(
|
||||
return SourceReferenceFormatter::formatErrorInformation(
|
||||
_error,
|
||||
_error.type(),
|
||||
*m_compiler,
|
||||
_colored,
|
||||
_withErrorIds
|
||||
|
@ -58,7 +58,7 @@ protected:
|
||||
langutil::ErrorList expectError(std::string const& _source, bool _warning = false, bool _allowMultiple = false);
|
||||
|
||||
std::string formatErrors(
|
||||
langutil::ErrorList _errors,
|
||||
langutil::ErrorList const& _errors,
|
||||
bool _colored = false,
|
||||
bool _withErrorIds = false
|
||||
) const;
|
||||
|
Loading…
Reference in New Issue
Block a user