mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-08 12:18:50 +02:00
[PTRun][Program]Add logs on launch failure (#17270)
This commit is contained in:
@@ -185,8 +185,9 @@ namespace Microsoft.Plugin.Program
|
|||||||
|
|
||||||
runProcess(info);
|
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 name = "Plugin: " + Properties.Resources.wox_plugin_program_plugin_name;
|
||||||
var message = $"{Properties.Resources.powertoys_run_plugin_program_start_failed}: {info?.FileName}";
|
var message = $"{Properties.Resources.powertoys_run_plugin_program_start_failed}: {info?.FileName}";
|
||||||
_context.API.ShowMsg(name, message, string.Empty);
|
_context.API.ShowMsg(name, message, string.Empty);
|
||||||
|
|||||||
@@ -214,8 +214,9 @@ namespace Microsoft.Plugin.Program.Programs
|
|||||||
{
|
{
|
||||||
appManager.ActivateApplication(UserModelId, queryArguments, noFlags, out var unusedPid);
|
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 name = "Plugin: " + Properties.Resources.wox_plugin_program_plugin_name;
|
||||||
var message = $"{Properties.Resources.powertoys_run_plugin_program_uwp_failed}: {DisplayName}";
|
var message = $"{Properties.Resources.powertoys_run_plugin_program_uwp_failed}: {DisplayName}";
|
||||||
api.ShowMsg(name, message, string.Empty);
|
api.ShowMsg(name, message, string.Empty);
|
||||||
|
|||||||
Reference in New Issue
Block a user