mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 02:36:19 +02:00
more braces and whitespace style errors (#5951)
This commit is contained in:
@@ -51,8 +51,7 @@ namespace Microsoft.Plugin.Program.Logger
|
||||
/// Logs an exception
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.Synchronized)]
|
||||
internal static void LogException(string classname, string callingMethodName, string loadingProgramPath,
|
||||
string interpretationMessage, Exception e)
|
||||
internal static void LogException(string classname, string callingMethodName, string loadingProgramPath, string interpretationMessage, Exception e)
|
||||
{
|
||||
Debug.WriteLine($"ERROR{classname}|{callingMethodName}|{loadingProgramPath}|{interpretationMessage}");
|
||||
|
||||
@@ -121,12 +120,16 @@ namespace Microsoft.Plugin.Program.Logger
|
||||
|
||||
private static bool IsKnownWinProgramError(Exception e, string callingMethodName)
|
||||
{
|
||||
if (e.TargetSite?.Name == "GetDescription" && callingMethodName == "LnkProgram")
|
||||
return true;
|
||||
|
||||
if (e is SecurityException || e is UnauthorizedAccessException || e is DirectoryNotFoundException)
|
||||
return true;
|
||||
|
||||
if (e.TargetSite?.Name == "GetDescription" && callingMethodName == "LnkProgram")
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if (e is SecurityException || e is UnauthorizedAccessException || e is DirectoryNotFoundException)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -134,12 +137,16 @@ namespace Microsoft.Plugin.Program.Logger
|
||||
{
|
||||
if (((e.HResult == -2147024774 || e.HResult == -2147009769) && callingMethodName == "ResourceFromPri")
|
||||
|| (e.HResult == -2147024894 && (callingMethodName == "LogoPathFromUri" || callingMethodName == "ImageFromPath"))
|
||||
|| (e.HResult == -2147024864 && callingMethodName == "InitializeAppInfo"))
|
||||
return true;
|
||||
|
||||
if (callingMethodName == "XmlNamespaces")
|
||||
return true;
|
||||
|
||||
|| (e.HResult == -2147024864 && callingMethodName == "InitializeAppInfo"))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if (callingMethodName == "XmlNamespaces")
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user