mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-06-30 23:49:42 +02:00
Compare commits
3 Commits
copilot/fi
...
copilot/fi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f9679b937d | ||
|
|
36300d3c75 | ||
|
|
1cde68ae04 |
@@ -6,6 +6,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO.Abstractions;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.InteropServices.ComTypes;
|
||||
using System.Xml.Linq;
|
||||
@@ -81,7 +82,7 @@ namespace Microsoft.Plugin.Program.Programs
|
||||
|
||||
if (Marshal.ReleaseComObject(stream) > 0)
|
||||
{
|
||||
Log.Error("AppxManifest.xml was leaked", GetType());
|
||||
Log.Error("AppxManifest.xml was leaked", MethodBase.GetCurrentMethod().DeclaringType);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -109,7 +110,7 @@ namespace Microsoft.Plugin.Program.Programs
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.Error($"Error occurred while trying to get the XML from {path}", typeof(UWP));
|
||||
Log.Error($"Error occurred while trying to get the XML from {path}", MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
return Array.Empty<string>();
|
||||
}
|
||||
@@ -144,7 +145,7 @@ namespace Microsoft.Plugin.Program.Programs
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
ProgramLogger.Exception($"Unable to convert Package to UWP for {p.FullName}", e, typeof(UWP), p.InstalledLocation);
|
||||
ProgramLogger.Exception($"Unable to convert Package to UWP for {p.FullName}", e, MethodBase.GetCurrentMethod().DeclaringType, p.InstalledLocation);
|
||||
|
||||
return Array.Empty<UWPApplication>();
|
||||
}
|
||||
@@ -176,7 +177,7 @@ namespace Microsoft.Plugin.Program.Programs
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
ProgramLogger.Exception("An unexpected error occurred and unable to verify if package is valid", e, typeof(UWP), "id");
|
||||
ProgramLogger.Exception("An unexpected error occurred and unable to verify if package is valid", e, MethodBase.GetCurrentMethod().DeclaringType, "id");
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
@@ -215,7 +215,7 @@ namespace Microsoft.Plugin.Program.Programs
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ProgramLogger.Exception($"Unable to launch UWP {DisplayName}", ex, GetType(), queryArguments);
|
||||
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);
|
||||
@@ -284,7 +284,7 @@ namespace Microsoft.Plugin.Program.Programs
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
ProgramLogger.Exception($"Unable to parse manifest file for {DisplayName}", e, GetType(), manifest);
|
||||
ProgramLogger.Exception($"Unable to parse manifest file for {DisplayName}", e, MethodBase.GetCurrentMethod().DeclaringType, manifest);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Input;
|
||||
|
||||
using ManagedCommon;
|
||||
using Microsoft.PowerToys.Settings.UI.Helpers;
|
||||
using Microsoft.PowerToys.Settings.UI.Library;
|
||||
using Microsoft.PowerToys.Settings.UI.Library.Helpers;
|
||||
@@ -135,7 +136,18 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
||||
|
||||
private void Frame_NavigationFailed(object sender, NavigationFailedEventArgs e)
|
||||
{
|
||||
throw e.Exception;
|
||||
var sourcePage = e.SourcePageType?.FullName ?? "<unknown>";
|
||||
|
||||
if (e.Exception is null)
|
||||
{
|
||||
Logger.LogWarning($"Navigation to '{sourcePage}' failed without an exception.");
|
||||
}
|
||||
else
|
||||
{
|
||||
Logger.LogError($"Navigation to '{sourcePage}' failed.", e.Exception);
|
||||
}
|
||||
|
||||
e.Handled = true;
|
||||
}
|
||||
|
||||
private void Frame_Navigated(object sender, NavigationEventArgs e)
|
||||
|
||||
Reference in New Issue
Block a user