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(
|
string AnalysisFramework::formatErrors(
|
||||||
langutil::ErrorList _errors,
|
langutil::ErrorList const& _errors,
|
||||||
bool _colored,
|
bool _colored,
|
||||||
bool _withErrorIds
|
bool _withErrorIds
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
string message;
|
return SourceReferenceFormatter::formatErrorInformation(
|
||||||
for (auto const& error: _errors)
|
_errors,
|
||||||
message += formatError(*error, _colored, _withErrorIds);
|
*m_compiler,
|
||||||
return message;
|
_colored,
|
||||||
|
_withErrorIds
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
string AnalysisFramework::formatError(
|
string AnalysisFramework::formatError(
|
||||||
@ -164,9 +166,8 @@ string AnalysisFramework::formatError(
|
|||||||
bool _withErrorIds
|
bool _withErrorIds
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
return SourceReferenceFormatter::formatExceptionInformation(
|
return SourceReferenceFormatter::formatErrorInformation(
|
||||||
_error,
|
_error,
|
||||||
_error.type(),
|
|
||||||
*m_compiler,
|
*m_compiler,
|
||||||
_colored,
|
_colored,
|
||||||
_withErrorIds
|
_withErrorIds
|
||||||
|
@ -58,7 +58,7 @@ protected:
|
|||||||
langutil::ErrorList expectError(std::string const& _source, bool _warning = false, bool _allowMultiple = false);
|
langutil::ErrorList expectError(std::string const& _source, bool _warning = false, bool _allowMultiple = false);
|
||||||
|
|
||||||
std::string formatErrors(
|
std::string formatErrors(
|
||||||
langutil::ErrorList _errors,
|
langutil::ErrorList const& _errors,
|
||||||
bool _colored = false,
|
bool _colored = false,
|
||||||
bool _withErrorIds = false
|
bool _withErrorIds = false
|
||||||
) const;
|
) const;
|
||||||
|
Loading…
Reference in New Issue
Block a user