refs #815 Catch and handle CJsonException when calling convertFromJson.

This commit is contained in:
Mathew Sutcliffe
2016-12-21 02:27:21 +00:00
parent 4f6d3ed3a3
commit 51c3ae8c25
8 changed files with 65 additions and 18 deletions

View File

@@ -149,7 +149,8 @@ namespace BlackGui
if (typeName.isEmpty() || typeId == QMetaType::UnknownType) { return CVariant(); }
CVariant valueVariant;
valueVariant.convertFromJson(jsonObj);
const CStatusMessage status = valueVariant.convertFromJsonNoThrow(jsonObj, {}, {});
if (status.isFailure()) { return CVariant(); }
return valueVariant;
}