summaryrefslogtreecommitdiffstats
path: root/application/pages
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 /application/pages
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 'application/pages')
-rw-r--r--application/pages/instance/ServersPage.cpp4
-rw-r--r--application/pages/instance/VersionPage.cpp6
2 files changed, 5 insertions, 5 deletions
diff --git a/application/pages/instance/ServersPage.cpp b/application/pages/instance/ServersPage.cpp
index f7ddc7da..1612ce09 100644
--- a/application/pages/instance/ServersPage.cpp
+++ b/application/pages/instance/ServersPage.cpp
@@ -109,7 +109,7 @@ static std::unique_ptr <nbt::tag_compound> parseServersDat(const QString& filena
return std::move(pair.second);
}
- catch(...)
+ catch (...)
{
return nullptr;
}
@@ -125,7 +125,7 @@ static bool serializeServerDat(const QString& filename, nbt::tag_compound * leve
FS::write(filename, val);
return true;
}
- catch(...)
+ catch (...)
{
return false;
}
diff --git a/application/pages/instance/VersionPage.cpp b/application/pages/instance/VersionPage.cpp
index 00ae0a7e..981cbd8c 100644
--- a/application/pages/instance/VersionPage.cpp
+++ b/application/pages/instance/VersionPage.cpp
@@ -200,7 +200,7 @@ bool VersionPage::reloadComponentList()
m_profile->reload(Net::Mode::Online);
return true;
}
- catch (Exception &e)
+ catch (const Exception &e)
{
QMessageBox::critical(this, tr("Error"), e.cause());
return false;
@@ -269,7 +269,7 @@ void VersionPage::on_moveUpBtn_clicked()
{
m_profile->move(currentRow(), ComponentList::MoveUp);
}
- catch (Exception &e)
+ catch (const Exception &e)
{
QMessageBox::critical(this, tr("Error"), e.cause());
}
@@ -282,7 +282,7 @@ void VersionPage::on_moveDownBtn_clicked()
{
m_profile->move(currentRow(), ComponentList::MoveDown);
}
- catch (Exception &e)
+ catch (const Exception &e)
{
QMessageBox::critical(this, tr("Error"), e.cause());
}