Skip to content

Commit

Permalink
[PTRun][Program]Add logs on launch failure
Browse files Browse the repository at this point in the history
  • Loading branch information
jaimecbernardo committed Mar 10, 2022
1 parent ba525f0 commit c5dd522
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,9 @@ public static void StartProcess(Func<ProcessStartInfo, Process> 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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit c5dd522

Please sign in to comment.