mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-03 07:35:48 +08:00
refs #815 Catch and handle CJsonException when calling convertFromJson.
This commit is contained in:
@@ -124,7 +124,16 @@ namespace BlackGui
|
||||
CLogMessage(this).validationError("Parse error: %1") << jsonError.errorString();
|
||||
return;
|
||||
}
|
||||
parts.convertFromJson(jsonDoc.object());
|
||||
|
||||
try
|
||||
{
|
||||
parts.convertFromJson(jsonDoc.object());
|
||||
}
|
||||
catch (const CJsonException &ex)
|
||||
{
|
||||
ex.toLogMessage(this, "Parse error");
|
||||
return;
|
||||
}
|
||||
partsToGui(parts);
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user