mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #2161 from ethereum/jsonio-cleanup
Small cleanups to JSON IO
This commit is contained in:
@@ -33,22 +33,22 @@ Error::Error(Type _type, SourceLocation const& _location, string const& _descrip
|
||||
switch(m_type)
|
||||
{
|
||||
case Type::DeclarationError:
|
||||
m_typeName = "Declaration Error";
|
||||
m_typeName = "DeclarationError";
|
||||
break;
|
||||
case Type::DocstringParsingError:
|
||||
m_typeName = "Docstring Parsing Error";
|
||||
m_typeName = "DocstringParsingError";
|
||||
break;
|
||||
case Type::ParserError:
|
||||
m_typeName = "Parser Error";
|
||||
m_typeName = "ParserError";
|
||||
break;
|
||||
case Type::SyntaxError:
|
||||
m_typeName = "Syntax Error";
|
||||
m_typeName = "SyntaxError";
|
||||
break;
|
||||
case Type::TypeError:
|
||||
m_typeName = "Type Error";
|
||||
m_typeName = "TypeError";
|
||||
break;
|
||||
case Type::Why3TranslatorError:
|
||||
m_typeName = "Why3 Translator Error";
|
||||
m_typeName = "Why3TranslatorError";
|
||||
break;
|
||||
case Type::Warning:
|
||||
m_typeName = "Warning";
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user