Compare commits

...

2 Commits

2 changed files with 6 additions and 7 deletions

View File

@@ -6,7 +6,6 @@ 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;
@@ -82,7 +81,7 @@ namespace Microsoft.Plugin.Program.Programs
if (Marshal.ReleaseComObject(stream) > 0)
{
Log.Error("AppxManifest.xml was leaked", MethodBase.GetCurrentMethod().DeclaringType);
Log.Error("AppxManifest.xml was leaked", GetType());
}
}
else
@@ -110,7 +109,7 @@ namespace Microsoft.Plugin.Program.Programs
}
else
{
Log.Error($"Error occurred while trying to get the XML from {path}", MethodBase.GetCurrentMethod().DeclaringType);
Log.Error($"Error occurred while trying to get the XML from {path}", typeof(UWP));
return Array.Empty<string>();
}
@@ -145,7 +144,7 @@ namespace Microsoft.Plugin.Program.Programs
}
catch (Exception e)
{
ProgramLogger.Exception($"Unable to convert Package to UWP for {p.FullName}", e, MethodBase.GetCurrentMethod().DeclaringType, p.InstalledLocation);
ProgramLogger.Exception($"Unable to convert Package to UWP for {p.FullName}", e, typeof(UWP), p.InstalledLocation);
return Array.Empty<UWPApplication>();
}
@@ -177,7 +176,7 @@ namespace Microsoft.Plugin.Program.Programs
}
catch (Exception e)
{
ProgramLogger.Exception("An unexpected error occurred and unable to verify if package is valid", e, MethodBase.GetCurrentMethod().DeclaringType, "id");
ProgramLogger.Exception("An unexpected error occurred and unable to verify if package is valid", e, typeof(UWP), "id");
return false;
}
});

View File

@@ -215,7 +215,7 @@ namespace Microsoft.Plugin.Program.Programs
}
catch (Exception ex)
{
ProgramLogger.Exception($"Unable to launch UWP {DisplayName}", ex, MethodBase.GetCurrentMethod().DeclaringType, queryArguments);
ProgramLogger.Exception($"Unable to launch UWP {DisplayName}", ex, GetType(), 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, MethodBase.GetCurrentMethod().DeclaringType, manifest);
ProgramLogger.Exception($"Unable to parse manifest file for {DisplayName}", e, GetType(), manifest);
}
}
}