mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-14 08:45:36 +08:00
refs #815 Catch and handle CJsonException when calling convertFromJson.
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
#include "blackmisc/propertyindex.h"
|
||||
#include "blackmisc/range.h"
|
||||
#include "blackmisc/slot.h"
|
||||
#include "blackmisc/statusmessage.h"
|
||||
#include "blackmisc/statusmessagelist.h"
|
||||
#include "blackmisc/valuecacheprivate.h"
|
||||
#include "blackmisc/variant.h"
|
||||
#include "blackmisc/variantmap.h"
|
||||
@@ -193,9 +193,14 @@ namespace BlackMisc
|
||||
|
||||
//! Load all values in Json format.
|
||||
//! Values already in the cache will remain in the cache unless they are overwritten.
|
||||
//! \throws BlackMisc::CJsonException if JSON schema validation fails.
|
||||
//! \threadsafe
|
||||
void loadFromJson(const QJsonObject &json);
|
||||
|
||||
//! Call loadFromJson, catch any CJsonException that are thrown and return them as CStatusMessage.
|
||||
//! \threadsafe
|
||||
CStatusMessageList loadFromJsonNoThrow(const QJsonObject &json, const CLogCategoryList &categories, const QString &prefix);
|
||||
|
||||
//! Save values to Json files in a given directory.
|
||||
//! If prefix is provided then only those values whose keys start with that prefix.
|
||||
//! \threadsafe
|
||||
|
||||
Reference in New Issue
Block a user