mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Ensure the language field is present in the JSON
This commit is contained in:
parent
6d13260232
commit
f71b465eb7
@ -152,6 +152,12 @@ Json::Value StandardCompiler::compileInternal(Json::Value const& _input)
|
||||
{
|
||||
m_compilerStack.reset(false);
|
||||
|
||||
if (!_input.isObject())
|
||||
return formatFatalError("JSONError", "Input is not a JSON object.");
|
||||
|
||||
if (_input["language"] != "Solidity")
|
||||
return formatFatalError("JSONError", "Only \"Solidity\" is supported as a language.");
|
||||
|
||||
Json::Value const& sources = _input["sources"];
|
||||
if (!sources)
|
||||
return formatFatalError("JSONError", "No input sources specified.");
|
||||
|
Loading…
Reference in New Issue
Block a user