From 35fccf8af8d1422ce13ed43089583294eff12646 Mon Sep 17 00:00:00 2001 From: ryanbodrug-microsoft <56318517+ryanbodrug-microsoft@users.noreply.github.com> Date: Thu, 18 Jun 2020 08:17:37 -0700 Subject: [PATCH] Fix for Warning CA1031: Removing catch, as it doesn't recover from the exception, but hides the exception from showing up in crash reports / telemetry. Warning CA1031 Modify '.ctor' to catch a more specific allowed exception type, or rethrow the exception. PowerLauncher C:\Repos\PowerToys\src\modules\launcher\PowerLauncher\SettingsWatcher.cs 33 Active --- src/modules/launcher/PowerLauncher/SettingsWatcher.cs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/modules/launcher/PowerLauncher/SettingsWatcher.cs b/src/modules/launcher/PowerLauncher/SettingsWatcher.cs index b815a7c25a..ef07f684cd 100644 --- a/src/modules/launcher/PowerLauncher/SettingsWatcher.cs +++ b/src/modules/launcher/PowerLauncher/SettingsWatcher.cs @@ -26,14 +26,7 @@ namespace PowerLauncher { _settings = settings; // Set up watcher - try - { - _watcher = Helper.GetFileWatcher(PowerLauncherSettings.POWERTOYNAME, "settings.json", OverloadSettings); - } - catch (Exception e) - { - Debug.WriteLine(e.Message); - } + _watcher = Helper.GetFileWatcher(PowerLauncherSettings.POWERTOYNAME, "settings.json", OverloadSettings); // Load initial settings file OverloadSettings();