NOISSUE Handle JSON exceptions in ATLauncher support
Thanks to phit for pointing this out :)
This commit is contained in:
parent
3a1abb555b
commit
d6dc22d57c
@ -125,13 +125,12 @@ SET(MULTIMC_SOURCES
|
|||||||
pages/modplatform/VanillaPage.cpp
|
pages/modplatform/VanillaPage.cpp
|
||||||
pages/modplatform/VanillaPage.h
|
pages/modplatform/VanillaPage.h
|
||||||
|
|
||||||
pages/modplatform/atlauncher/AtlModel.cpp
|
|
||||||
pages/modplatform/atlauncher/AtlModel.h
|
|
||||||
pages/modplatform/atlauncher/AtlFilterModel.cpp
|
pages/modplatform/atlauncher/AtlFilterModel.cpp
|
||||||
pages/modplatform/atlauncher/AtlFilterModel.h
|
pages/modplatform/atlauncher/AtlFilterModel.h
|
||||||
|
pages/modplatform/atlauncher/AtlListModel.cpp
|
||||||
|
pages/modplatform/atlauncher/AtlListModel.h
|
||||||
pages/modplatform/atlauncher/AtlPage.cpp
|
pages/modplatform/atlauncher/AtlPage.cpp
|
||||||
pages/modplatform/atlauncher/AtlPage.h
|
pages/modplatform/atlauncher/AtlPage.h
|
||||||
pages/modplatform/atlauncher/AtlPage.h
|
|
||||||
|
|
||||||
pages/modplatform/ftb/FtbFilterModel.cpp
|
pages/modplatform/ftb/FtbFilterModel.cpp
|
||||||
pages/modplatform/ftb/FtbFilterModel.h
|
pages/modplatform/ftb/FtbFilterModel.h
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
#include "AtlModel.h"
|
#include "AtlListModel.h"
|
||||||
|
|
||||||
#include <BuildConfig.h>
|
#include <BuildConfig.h>
|
||||||
#include <MultiMC.h>
|
#include <MultiMC.h>
|
||||||
#include <Env.h>
|
#include <Env.h>
|
||||||
|
#include <Json.h>
|
||||||
|
|
||||||
namespace Atl {
|
namespace Atl {
|
||||||
|
|
||||||
@ -99,7 +100,15 @@ void ListModel::requestFinished()
|
|||||||
auto packObj = packRaw.toObject();
|
auto packObj = packRaw.toObject();
|
||||||
|
|
||||||
ATLauncher::IndexedPack pack;
|
ATLauncher::IndexedPack pack;
|
||||||
ATLauncher::loadIndexedPack(pack, packObj);
|
|
||||||
|
try {
|
||||||
|
ATLauncher::loadIndexedPack(pack, packObj);
|
||||||
|
}
|
||||||
|
catch (const JSONValidationError &e) {
|
||||||
|
qDebug() << QString::fromUtf8(response);
|
||||||
|
qWarning() << "Error while reading pack manifest from ATLauncher: " << e.cause();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// ignore packs without a published version
|
// ignore packs without a published version
|
||||||
if(pack.versions.length() == 0) continue;
|
if(pack.versions.length() == 0) continue;
|
@ -16,7 +16,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "AtlFilterModel.h"
|
#include "AtlFilterModel.h"
|
||||||
#include "AtlModel.h"
|
#include "AtlListModel.h"
|
||||||
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user