Reject import URLs for now

This commit is contained in:
Alex Beregszaszi
2017-04-20 19:38:00 +01:00
parent df7e703925
commit 77d5148f0d
+6 -1
View File
@@ -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());