summaryrefslogtreecommitdiffstats
path: root/logic/minecraft/onesix/OneSixInstance.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2016-03-18 15:02:54 +0100
committerPetr Mrázek <peterix@gmail.com>2016-03-26 17:05:27 +0100
commitb7d8e512f4184a755809fe9a964a04921f8abf7c (patch)
tree2d67f30a2c57743dac5fc9dc819e6c5d58b41962 /logic/minecraft/onesix/OneSixInstance.cpp
parentfb9dfcb951d9cf9c19fc868703cb66e15aa9a1e6 (diff)
downloadMultiMC-b7d8e512f4184a755809fe9a964a04921f8abf7c.tar
MultiMC-b7d8e512f4184a755809fe9a964a04921f8abf7c.tar.gz
MultiMC-b7d8e512f4184a755809fe9a964a04921f8abf7c.tar.lz
MultiMC-b7d8e512f4184a755809fe9a964a04921f8abf7c.tar.xz
MultiMC-b7d8e512f4184a755809fe9a964a04921f8abf7c.zip
NOISSUE Use patch problems and problem levels instead of exceptions for minecraft profiles.
Diffstat (limited to 'logic/minecraft/onesix/OneSixInstance.cpp')
-rw-r--r--logic/minecraft/onesix/OneSixInstance.cpp20
1 files changed, 7 insertions, 13 deletions
diff --git a/logic/minecraft/onesix/OneSixInstance.cpp b/logic/minecraft/onesix/OneSixInstance.cpp
index 3e83ff1c..f8b274ff 100644
--- a/logic/minecraft/onesix/OneSixInstance.cpp
+++ b/logic/minecraft/onesix/OneSixInstance.cpp
@@ -463,23 +463,17 @@ QString OneSixInstance::currentVersionId() const
void OneSixInstance::reloadProfile()
{
- try
- {
- m_profile->reload();
- unsetFlag(VersionBrokenFlag);
- emit versionReloaded();
- }
- catch (VersionIncomplete &error)
+ m_profile->reload();
+ auto severity = m_profile->getProblemSeverity();
+ if(severity == ProblemSeverity::PROBLEM_ERROR)
{
+ setFlag(VersionBrokenFlag);
}
- catch (Exception &error)
+ else
{
- m_profile->clear();
- setFlag(VersionBrokenFlag);
- // TODO: rethrow to show some error message(s)?
- emit versionReloaded();
- throw;
+ unsetFlag(VersionBrokenFlag);
}
+ emit versionReloaded();
}
void OneSixInstance::clearProfile()