Catch std::exception by reference (#20385)

This commit is contained in:
NN
2022-09-11 19:50:13 +03:00
committed by GitHub
parent 675d79a4aa
commit 922d21f9f1
13 changed files with 24 additions and 24 deletions

View File

@@ -176,7 +176,7 @@ public:
PowerToysSettings::CustomActionObject action_object =
PowerToysSettings::CustomActionObject::from_json_string(action);
}
catch (std::exception ex)
catch (std::exception&)
{
// Improper JSON.
}
@@ -198,7 +198,7 @@ public:
// Otherwise call a custom function to process the settings before saving them to disk:
// save_settings();
}
catch (std::exception ex)
catch (std::exception&)
{
// Improper JSON.
}
@@ -366,7 +366,7 @@ void Microsoft_Launcher::init_settings()
parse_hotkey(settings);
}
catch (std::exception ex)
catch (std::exception&)
{
// Error while loading from the settings file. Let default values stay as they are.
}