diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-03-29 22:19:10 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-04-21 02:38:00 +0800 |
commit | 2c15e2b5412d0eff4b06ed0a44b1d5fdc219258b (patch) | |
tree | 22059ef2671606ea948bd42081dd4d1253f532fd /libsolidity/interface | |
parent | 5aec120da345fc5e59cf3847d3947b34ee0a54a7 (diff) | |
download | dexon-solidity-2c15e2b5412d0eff4b06ed0a44b1d5fdc219258b.tar.gz dexon-solidity-2c15e2b5412d0eff4b06ed0a44b1d5fdc219258b.tar.zst dexon-solidity-2c15e2b5412d0eff4b06ed0a44b1d5fdc219258b.zip |
Fail if no sources are given
Diffstat (limited to 'libsolidity/interface')
-rw-r--r-- | libsolidity/interface/StandardCompiler.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/libsolidity/interface/StandardCompiler.cpp b/libsolidity/interface/StandardCompiler.cpp index d78a9487..7fb715bf 100644 --- a/libsolidity/interface/StandardCompiler.cpp +++ b/libsolidity/interface/StandardCompiler.cpp @@ -61,10 +61,7 @@ Json::Value StandardCompiler::compileInternal(Json::Value const& _input) Json::Value const& sources = _input["sources"]; if (!sources) - { - // @TODO report error - return Json::Value(); - } + return formatFatalError("JSONError", "No input sources specified."); for (auto const& sourceName: sources.getMemberNames()) m_compilerStack.addSource(sourceName, sources[sourceName]["content"].asString()); |