aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-12-18 19:40:06 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2017-12-18 20:17:51 +0800
commitadd4cde68cd9b5c52db8a312a34591a8bb61d8fa (patch)
tree1d30d74edca347bdaf1e428f1b1fa0efb16faf7a /libsolidity
parent3d1830f3f27f4b915b27472dcfb326223ef77e50 (diff)
downloaddexon-solidity-add4cde68cd9b5c52db8a312a34591a8bb61d8fa.tar
dexon-solidity-add4cde68cd9b5c52db8a312a34591a8bb61d8fa.tar.gz
dexon-solidity-add4cde68cd9b5c52db8a312a34591a8bb61d8fa.tar.bz2
dexon-solidity-add4cde68cd9b5c52db8a312a34591a8bb61d8fa.tar.lz
dexon-solidity-add4cde68cd9b5c52db8a312a34591a8bb61d8fa.tar.xz
dexon-solidity-add4cde68cd9b5c52db8a312a34591a8bb61d8fa.tar.zst
dexon-solidity-add4cde68cd9b5c52db8a312a34591a8bb61d8fa.zip
Populate the sourceLocation field properly in standard JSON on errors
Diffstat (limited to 'libsolidity')
-rw-r--r--libsolidity/interface/StandardCompiler.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libsolidity/interface/StandardCompiler.cpp b/libsolidity/interface/StandardCompiler.cpp
index ad01821e..d44254ed 100644
--- a/libsolidity/interface/StandardCompiler.cpp
+++ b/libsolidity/interface/StandardCompiler.cpp
@@ -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)