more braces and whitespace style errors (#5951)

This commit is contained in:
Clint Rutkas
2020-08-14 09:22:12 -07:00
committed by GitHub
parent 9e8b0d2807
commit 913615f1c2
14 changed files with 80 additions and 68 deletions

View File

@@ -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;
}
}