mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-01 13:36:48 +08:00
refs #815 Throw CJsonException when required JSON objects are not found.
This commit is contained in:
@@ -194,8 +194,9 @@ namespace BlackMisc
|
||||
|
||||
void CUrl::convertFromJson(const QJsonObject &json)
|
||||
{
|
||||
QString url(json.value("url").toString());
|
||||
this->setFullUrl(url);
|
||||
const QJsonValue value = json.value("url");
|
||||
if (value.isUndefined()) { throw CJsonException("Missing 'url'"); }
|
||||
this->setFullUrl(value.toString());
|
||||
}
|
||||
|
||||
int CUrl::protocolToDefaultPort(const QString &protocol)
|
||||
|
||||
Reference in New Issue
Block a user