File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
resources/share/shared/bootstrap Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 7171 }
7272 ]
7373 },
74- "wasLoadedFromFile" : false ,
74+ "wasLoadedFromFile" : false
7575}
Original file line number Diff line number Diff line change @@ -411,7 +411,14 @@ namespace BlackMisc::Json
411411 QJsonObject jsonObjectFromString (const QString &json, bool acceptCacheFormat)
412412 {
413413 if (json.isEmpty ()) { return QJsonObject (); }
414- const QJsonDocument jsonDoc (QJsonDocument::fromJson (json.toUtf8 ()));
414+
415+ QJsonParseError error {};
416+ const QJsonDocument jsonDoc (QJsonDocument::fromJson (json.toUtf8 (), &error));
417+ if (error.error != QJsonParseError::NoError)
418+ {
419+ throw CJsonException (error.errorString ());
420+ }
421+
415422 return acceptCacheFormat ? Json::unwrapCache (jsonDoc.object ()) : jsonDoc.object ();
416423 }
417424
You can’t perform that action at this time.
0 commit comments