aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-12-18 22:32:23 +0800
committerGitHub <noreply@github.com>2017-12-18 22:32:23 +0800
commit55752db9569a3d6c0253beb26465c722245a4505 (patch)
treeae39ac59506781bc8b858f16f1e2f2ff91f3992a /libsolidity
parent460c9f3943454ecb1679746b363ddbc5b903849b (diff)
parentadd4cde68cd9b5c52db8a312a34591a8bb61d8fa (diff)
downloaddexon-solidity-55752db9569a3d6c0253beb26465c722245a4505.tar
dexon-solidity-55752db9569a3d6c0253beb26465c722245a4505.tar.gz
dexon-solidity-55752db9569a3d6c0253beb26465c722245a4505.tar.bz2
dexon-solidity-55752db9569a3d6c0253beb26465c722245a4505.tar.lz
dexon-solidity-55752db9569a3d6c0253beb26465c722245a4505.tar.xz
dexon-solidity-55752db9569a3d6c0253beb26465c722245a4505.tar.zst
dexon-solidity-55752db9569a3d6c0253beb26465c722245a4505.zip
Merge pull request #3342 from ethereum/jsonio-sourcelocation
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)