mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Accessors for exceptions.
This commit is contained in:
@@ -100,7 +100,7 @@ ErrorList AnalysisFramework::filterErrors(ErrorList const& _errorList, bool _inc
|
||||
for (auto const& messagePrefix: m_messagesToCut)
|
||||
if (currentError->comment()->find(messagePrefix) == 0)
|
||||
{
|
||||
SourceLocation const* location = boost::get_error_info<errinfo_sourceLocation>(*currentError);
|
||||
SourceLocation const* location = currentError->sourceLocation();
|
||||
// sufficient for now, but in future we might clone the error completely, including the secondary location
|
||||
newError = make_shared<Error>(
|
||||
currentError->errorId(),
|
||||
|
||||
@@ -118,9 +118,10 @@ void SyntaxTest::filterObtainedErrors()
|
||||
{
|
||||
for (auto const& currentError: filterErrors(compiler().errors(), true))
|
||||
{
|
||||
int locationStart = -1, locationEnd = -1;
|
||||
int locationStart = -1;
|
||||
int locationEnd = -1;
|
||||
string sourceName;
|
||||
if (auto location = boost::get_error_info<errinfo_sourceLocation>(*currentError))
|
||||
if (SourceLocation const* location = currentError->sourceLocation())
|
||||
{
|
||||
solAssert(location->sourceName, "");
|
||||
sourceName = *location->sourceName;
|
||||
|
||||
Reference in New Issue
Block a user