From 3f24c4cfe5afe47eb8ce6f0201b9099e4e50e8ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Sun, 23 Apr 2017 02:31:13 +0200 Subject: GH-1856 Make MultiMC fail hard when things are missing Things like: * jar mods * valid version files --- api/logic/minecraft/onesix/OneSixProfileStrategy.cpp | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'api/logic/minecraft/onesix/OneSixProfileStrategy.cpp') diff --git a/api/logic/minecraft/onesix/OneSixProfileStrategy.cpp b/api/logic/minecraft/onesix/OneSixProfileStrategy.cpp index b4be3356..0b83c2e1 100644 --- a/api/logic/minecraft/onesix/OneSixProfileStrategy.cpp +++ b/api/logic/minecraft/onesix/OneSixProfileStrategy.cpp @@ -2,7 +2,6 @@ #include "OneSixInstance.h" #include "OneSixVersionFormat.h" -#include "minecraft/VersionBuildError.h" #include "Env.h" #include @@ -107,10 +106,6 @@ void OneSixProfileStrategy::loadDefaultBuiltinPatches() profilePatch = std::make_shared(metaVersion); profilePatch->setVanilla(true); } - if (!profilePatch) - { - throw VersionIncomplete(uid); - } profilePatch->setOrder(order); profile->appendPatch(profilePatch); }; @@ -291,6 +286,7 @@ bool OneSixProfileStrategy::customizePatch(ProfilePatchPtr patch) { return false; } + // FIXME: get rid of this try-catch. try { QSaveFile jsonFile(filename); @@ -311,10 +307,6 @@ bool OneSixProfileStrategy::customizePatch(ProfilePatchPtr patch) } load(); } - catch (VersionIncomplete &error) - { - qDebug() << "Version was incomplete:" << error.cause(); - } catch (Exception &error) { qWarning() << "Version could not be loaded:" << error.cause(); @@ -337,14 +329,11 @@ bool OneSixProfileStrategy::revertPatch(ProfilePatchPtr patch) } // just kill the file and reload bool result = QFile::remove(filename); + // FIXME: get rid of this try-catch. try { load(); } - catch (VersionIncomplete &error) - { - qDebug() << "Version was incomplete:" << error.cause(); - } catch (Exception &error) { qWarning() << "Version could not be loaded:" << error.cause(); -- cgit v1.2.3