refs #815 Throw CJsonException when required JSON objects are not found.

This commit is contained in:
Mathew Sutcliffe
2016-12-18 04:44:25 +00:00
parent 7c5c9d30e6
commit bbdbd26f82
10 changed files with 112 additions and 40 deletions

View File

@@ -27,7 +27,10 @@ namespace BlackMisc
{
if (json.contains("IID")) // comes from the plugin
{
if (! json.contains("MetaData")) { throw CJsonException("Missing 'MetaData'"); }
// json data is already validated by CPluginManagerSimulator
CJsonScope scope("MetaData");
CValueObject::convertFromJson(json["MetaData"].toObject());
m_valid = true;
}