From 3b0238fc118aa217ad72d0231ae2fe4a1844b1cc Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Wed, 24 Jul 2019 14:55:54 +0200 Subject: [PATCH] UI: Catch by reference --- UI/auth-oauth.cpp | 2 +- UI/win-update/win-update.cpp | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/UI/auth-oauth.cpp b/UI/auth-oauth.cpp index ee33bb0bb..a27c49c17 100644 --- a/UI/auth-oauth.cpp +++ b/UI/auth-oauth.cpp @@ -259,7 +259,7 @@ try { return true; -} catch (ErrorInfo info) { +} catch (ErrorInfo &info) { if (!retry) { QString title = QTStr("Auth.AuthFailure.Title"); QString text = QTStr("Auth.AuthFailure.Text") diff --git a/UI/win-update/win-update.cpp b/UI/win-update/win-update.cpp index dd27abd99..00d891e83 100644 --- a/UI/win-update/win-update.cpp +++ b/UI/win-update/win-update.cpp @@ -146,7 +146,7 @@ try { return true; -} catch (string text) { +} catch (string &text) { blog(LOG_WARNING, "%s: %s", __FUNCTION__, text.c_str()); return false; } @@ -174,7 +174,7 @@ try { return true; -} catch (string text) { +} catch (string &text) { blog(LOG_WARNING, "%s: %s", __FUNCTION__, text.c_str()); return false; } @@ -229,7 +229,7 @@ try { return true; -} catch (string text) { +} catch (string &text) { blog(LOG_DEBUG, "%s: %s", __FUNCTION__, text.c_str()); return false; } @@ -332,7 +332,7 @@ try { return true; -} catch (string text) { +} catch (string &text) { blog(LOG_WARNING, "%s: %s", __FUNCTION__, text.c_str()); return false; } @@ -384,7 +384,7 @@ try { return true; -} catch (string text) { +} catch (string &text) { blog(LOG_WARNING, "%s: %s", __FUNCTION__, text.c_str()); return false; } @@ -430,7 +430,7 @@ try { return true; -} catch (string text) { +} catch (string &text) { blog(LOG_WARNING, "%s: %s", __FUNCTION__, text.c_str()); return false; } @@ -750,7 +750,7 @@ try { QMetaObject::invokeMethod(App()->GetMainWindow(), "close"); -} catch (string text) { +} catch (string &text) { blog(LOG_WARNING, "%s: %s", __FUNCTION__, text.c_str()); } @@ -845,6 +845,6 @@ try { emit Result(QString::fromUtf8(text.c_str())); -} catch (string text) { +} catch (string &text) { blog(LOG_WARNING, "%s: %s", __FUNCTION__, text.c_str()); }