Handle absence of Natspec doc and add option to solc

This commit is contained in:
Lefteris Karapetsas 2014-12-02 11:03:34 +01:00
parent e411449219
commit 0d3ab07ad1

View File

@ -140,8 +140,12 @@ string const& CompilerStack::getDocumentation()
for (FunctionDefinition const* f: exportedFunctions)
{
Json::Value user;
user["user"] = Json::Value(*f->getDocumentation());
methods[f->getName()] = user;
auto strPtr = f->getDocumentation();
if (strPtr)
{
user["user"] = Json::Value(*strPtr);
methods[f->getName()] = user;
}
}
doc["methods"] = methods;
m_documentation = writer.write(doc);