Merge pull request #2161 from ethereum/jsonio-cleanup

Small cleanups to JSON IO
This commit is contained in:
chriseth
2017-04-24 17:12:37 +02:00
committed by GitHub
3 changed files with 14 additions and 12 deletions
+6 -2
View File
@@ -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");
}
}