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
This commit is contained in:
ryanbodrug-microsoft 2020-06-18 08:17:37 -07:00
parent f5baa56e05
commit 35fccf8af8

View File

@ -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();