mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-01 21:56:43 +08:00
refs #815 Throw CJsonException when required JSON objects are not found.
This commit is contained in:
@@ -26,7 +26,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 CPluginManagerWeatherData
|
||||
CJsonScope scope("MetaData");
|
||||
CValueObject::convertFromJson(json["MetaData"].toObject());
|
||||
m_valid = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user