diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-03-30 10:17:17 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-04-21 02:38:00 +0800 |
commit | 77d5148f0d79c57d5d1ad3951f3692c9098cf194 (patch) | |
tree | 3245078aef57ff09548e9c264ad801b3eba44e9d /libsolidity/interface | |
parent | df7e703925e712a91871c517733c5d7949457ee2 (diff) | |
download | dexon-solidity-77d5148f0d79c57d5d1ad3951f3692c9098cf194.tar.gz dexon-solidity-77d5148f0d79c57d5d1ad3951f3692c9098cf194.tar.zst dexon-solidity-77d5148f0d79c57d5d1ad3951f3692c9098cf194.zip |
Reject import URLs for now
Diffstat (limited to 'libsolidity/interface')
-rw-r--r-- | libsolidity/interface/StandardCompiler.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libsolidity/interface/StandardCompiler.cpp b/libsolidity/interface/StandardCompiler.cpp index 42404a1c..4bc8f8e1 100644 --- a/libsolidity/interface/StandardCompiler.cpp +++ b/libsolidity/interface/StandardCompiler.cpp @@ -143,7 +143,12 @@ Json::Value StandardCompiler::compileInternal(Json::Value const& _input) return formatFatalError("JSONError", "No input sources specified."); for (auto const& sourceName: sources.getMemberNames()) - m_compilerStack.addSource(sourceName, sources[sourceName]["content"].asString()); + if (sources[sourceName]["content"].isString()) + m_compilerStack.addSource(sourceName, sources[sourceName]["content"].asString()); + else if (sources[sourceName]["urls"].isArray()) + return formatFatalError("UnimplementedFeatureError", "Input URLs not supported yet."); + else + return formatFatalError("JSONError", "Invalid input source specified."); Json::Value const& settings = _input.get("settings", Json::Value()); |