NOISSUE log even more about 'Flame' resolving issues

This commit is contained in:
Petr Mrázek 2017-05-09 21:56:33 +02:00
parent e029b7764e
commit 4cf4110d9d

View File

@ -38,19 +38,23 @@ void Flame::FileResolvingTask::netJobFinished()
{
auto doc = Json::requireDocument(bytes);
auto obj = Json::requireObject(doc);
auto & out = m_toProcess.files[index];
// result code signifies true failure.
if(obj.contains("code"))
{
qCritical() << "Resolving of" << out.projectId << out.fileId << "failed because of a negative result:";
qCritical() << bytes;
failed = true;
continue;
}
auto & out = m_toProcess.files[index];
out.fileName = Json::requireString(obj, "FileNameOnDisk");
out.url = Json::requireString(obj, "DownloadURL");
out.resolved = true;
}
catch(JSONValidationError & e)
{
auto & out = m_toProcess.files[index];
qCritical() << "Resolving of" << out.projectId << out.fileId << "failed because of a parsing error:";
qCritical() << e.cause();
qCritical() << "JSON:";
qCritical() << bytes;