refs #815 Added convertFromJsonNoThrow methods which catch CJsonException and return CStatusMessage.

This commit is contained in:
Mathew Sutcliffe
2016-12-20 23:10:21 +00:00
parent bbdbd26f82
commit 4f6d3ed3a3
6 changed files with 149 additions and 1 deletions

View File

@@ -142,6 +142,12 @@ namespace BlackMisc
this->convertFromJson(BlackMisc::Json::jsonObjectFromString(jsonString));
}
//! Call convertFromJson, catch any CJsonException that is thrown and return it as CStatusMessage.
CStatusMessage convertFromJsonNoThrow(const QJsonObject &json, const CLogCategoryList &categories, const QString &prefix); // implemented in statusmessage.h
//! Call convertFromJson, catch any CJsonException that is thrown and return it as CStatusMessage.
CStatusMessage convertFromJsonNoThrow(const QString &jsonString, const CLogCategoryList &categories, const QString &prefix); // implemented in statusmessage.h
//! \copydoc BlackMisc::Mixin::String::toQString
QString convertToQString(bool i18n = false) const
{