summaryrefslogtreecommitdiffstats
path: root/api/logic/minecraft/ComponentList.cpp
diff options
context:
space:
mode:
authorCharles Milette <me@charlesmilette.net>2018-05-19 19:18:26 -0400
committerCharles Milette <me@charlesmilette.net>2018-05-19 19:18:26 -0400
commit72c0002b45215466e06cd901fe95d9493d659ab2 (patch)
tree03a56f2da0f1ed34a219941060ec2100aedf1ac6 /api/logic/minecraft/ComponentList.cpp
parentb9fd381eee2f7c87e7645046b26dd552dc3cae5c (diff)
downloadMultiMC-72c0002b45215466e06cd901fe95d9493d659ab2.tar
MultiMC-72c0002b45215466e06cd901fe95d9493d659ab2.tar.gz
MultiMC-72c0002b45215466e06cd901fe95d9493d659ab2.tar.lz
MultiMC-72c0002b45215466e06cd901fe95d9493d659ab2.tar.xz
MultiMC-72c0002b45215466e06cd901fe95d9493d659ab2.zip
Catch C++ exceptions by const reference
Fixes #2277
Diffstat (limited to 'api/logic/minecraft/ComponentList.cpp')
-rw-r--r--api/logic/minecraft/ComponentList.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/api/logic/minecraft/ComponentList.cpp b/api/logic/minecraft/ComponentList.cpp
index a207e987..e373d499 100644
--- a/api/logic/minecraft/ComponentList.cpp
+++ b/api/logic/minecraft/ComponentList.cpp
@@ -195,7 +195,7 @@ static bool loadComponentList(ComponentList * parent, const QString & filename,
container.append(componentFromJsonV1(parent, componentJsonPattern, obj));
}
}
- catch (JSONValidationError &err)
+ catch (const JSONValidationError &err)
{
qCritical() << "Couldn't parse" << componentsFile.fileName() << ": bad file format";
container.clear();
@@ -1150,7 +1150,7 @@ std::shared_ptr<LaunchProfile> ComponentList::getProfile() const
}
d->m_profile = profile;
}
- catch (Exception & error)
+ catch (const Exception &error)
{
qWarning() << "Couldn't apply profile patches because: " << error.cause();
}