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 71
71
}
72
72
]
73
73
},
74
- "wasLoadedFromFile" : false ,
74
+ "wasLoadedFromFile" : false
75
75
}
Original file line number Diff line number Diff line change @@ -411,7 +411,14 @@ namespace BlackMisc::Json
411
411
QJsonObject jsonObjectFromString (const QString &json, bool acceptCacheFormat)
412
412
{
413
413
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
+
415
422
return acceptCacheFormat ? Json::unwrapCache (jsonDoc.object ()) : jsonDoc.object ();
416
423
}
417
424
You can’t perform that action at this time.
0 commit comments