diff options
author | chriseth <chris@ethereum.org> | 2017-04-24 23:12:37 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-24 23:12:37 +0800 |
commit | d3b8d5f0498724fc4271f907f0404b4ed7922399 (patch) | |
tree | 31250578aa02cc6d0a3c1286e5b487be0cb24085 /libsolidity/interface/StandardCompiler.cpp | |
parent | 2c3fea55df4e7eff6df515c19f5f80737e829bcf (diff) | |
parent | 43eb8398711f7fafd703cff06092f3dfd2b0e748 (diff) | |
download | dexon-solidity-d3b8d5f0498724fc4271f907f0404b4ed7922399.tar dexon-solidity-d3b8d5f0498724fc4271f907f0404b4ed7922399.tar.gz dexon-solidity-d3b8d5f0498724fc4271f907f0404b4ed7922399.tar.bz2 dexon-solidity-d3b8d5f0498724fc4271f907f0404b4ed7922399.tar.lz dexon-solidity-d3b8d5f0498724fc4271f907f0404b4ed7922399.tar.xz dexon-solidity-d3b8d5f0498724fc4271f907f0404b4ed7922399.tar.zst dexon-solidity-d3b8d5f0498724fc4271f907f0404b4ed7922399.zip |
Merge pull request #2161 from ethereum/jsonio-cleanup
Small cleanups to JSON IO
Diffstat (limited to 'libsolidity/interface/StandardCompiler.cpp')
-rw-r--r-- | libsolidity/interface/StandardCompiler.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libsolidity/interface/StandardCompiler.cpp b/libsolidity/interface/StandardCompiler.cpp index 582765e7..2b280dd5 100644 --- a/libsolidity/interface/StandardCompiler.cpp +++ b/libsolidity/interface/StandardCompiler.cpp @@ -378,7 +378,7 @@ Json::Value StandardCompiler::compileInternal(Json::Value const& _input) } Json::Value contractsOutput = Json::objectValue; - for (string const& contractName: m_compilerStack.contractNames()) + for (string const& contractName: success ? m_compilerStack.contractNames() : vector<string>()) { size_t colon = contractName.find(':'); solAssert(colon != string::npos, ""); @@ -454,9 +454,13 @@ Json::Value StandardCompiler::compile(Json::Value const& _input) { return compileInternal(_input); } + catch (Exception const& _exception) + { + return formatFatalError("InternalCompilerError", "Internal exception in StandardCompiler::compileInternal: " + boost::diagnostic_information(_exception)); + } catch (...) { - return formatFatalError("InternalCompilerError", "Internal exception in StandardCompiler::compilerInternal"); + return formatFatalError("InternalCompilerError", "Internal exception in StandardCompiler::compileInternal"); } } |