Basic logging in Solidity (though no tests yet).

This commit is contained in:
Gav Wood
2015-01-09 00:22:06 +01:00
parent d18fa27b6a
commit ffce12b7ee
7 changed files with 134 additions and 19 deletions
+8
View File
@@ -143,6 +143,11 @@ string const& CompilerStack::getInterface(string const& _contractName) const
return getJsonDocumentation(_contractName, DocumentationType::ABI_INTERFACE);
}
string const& CompilerStack::getSolidityInterface(string const& _contractName) const
{
return getJsonDocumentation(_contractName, DocumentationType::ABI_SOLIDITY_INTERFACE);
}
string const& CompilerStack::getJsonDocumentation(string const& _contractName, DocumentationType _type) const
{
if (!m_parseSuccessful)
@@ -162,6 +167,9 @@ string const& CompilerStack::getJsonDocumentation(string const& _contractName, D
case DocumentationType::ABI_INTERFACE:
doc = &contract.interface;
break;
case DocumentationType::ABI_SOLIDITY_INTERFACE:
doc = &contract.solidityInterface;
break;
default:
BOOST_THROW_EXCEPTION(InternalCompilerError() << errinfo_comment("Illegal documentation type."));
}