mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Populate the sourceLocation field properly in standard JSON on errors
This commit is contained in:
@@ -81,15 +81,15 @@ Json::Value formatErrorWithException(
|
||||
else
|
||||
message = _message;
|
||||
|
||||
Json::Value sourceLocation;
|
||||
if (location && location->sourceName)
|
||||
{
|
||||
Json::Value sourceLocation = Json::objectValue;
|
||||
sourceLocation["file"] = *location->sourceName;
|
||||
sourceLocation["start"] = location->start;
|
||||
sourceLocation["end"] = location->end;
|
||||
}
|
||||
|
||||
return formatError(_warning, _type, _component, message, formattedMessage, location);
|
||||
return formatError(_warning, _type, _component, message, formattedMessage, sourceLocation);
|
||||
}
|
||||
|
||||
set<string> requestedContractNames(Json::Value const& _outputSelection)
|
||||
|
||||
Reference in New Issue
Block a user