diff --git a/src/modules/launcher/Plugins/Microsoft.Plugin.Program/Main.cs b/src/modules/launcher/Plugins/Microsoft.Plugin.Program/Main.cs index 4d078cb0af4..8d09597b0e4 100644 --- a/src/modules/launcher/Plugins/Microsoft.Plugin.Program/Main.cs +++ b/src/modules/launcher/Plugins/Microsoft.Plugin.Program/Main.cs @@ -185,8 +185,9 @@ public static void StartProcess(Func runProcess, Proc runProcess(info); } - catch (Exception) + catch (Exception ex) { + Logger.ProgramLogger.Exception($"Unable to start ", ex, System.Reflection.MethodBase.GetCurrentMethod().DeclaringType, info?.FileName); var name = "Plugin: " + Properties.Resources.wox_plugin_program_plugin_name; var message = $"{Properties.Resources.powertoys_run_plugin_program_start_failed}: {info?.FileName}"; _context.API.ShowMsg(name, message, string.Empty); diff --git a/src/modules/launcher/Plugins/Microsoft.Plugin.Program/Programs/UWPApplication.cs b/src/modules/launcher/Plugins/Microsoft.Plugin.Program/Programs/UWPApplication.cs index de67536e28b..8355eac8d0a 100644 --- a/src/modules/launcher/Plugins/Microsoft.Plugin.Program/Programs/UWPApplication.cs +++ b/src/modules/launcher/Plugins/Microsoft.Plugin.Program/Programs/UWPApplication.cs @@ -214,8 +214,9 @@ await Task.Run(() => { appManager.ActivateApplication(UserModelId, queryArguments, noFlags, out var unusedPid); } - catch (Exception) + catch (Exception ex) { + ProgramLogger.Exception($"Unable to launch UWP {DisplayName}", ex, MethodBase.GetCurrentMethod().DeclaringType, queryArguments); var name = "Plugin: " + Properties.Resources.wox_plugin_program_plugin_name; var message = $"{Properties.Resources.powertoys_run_plugin_program_uwp_failed}: {DisplayName}"; api.ShowMsg(name, message, string.Empty);