Add file being held by another process error to known

This occurs during app initialisation, and add empty list to allow continuing during debug
This commit is contained in:
Jeremy Wu
2019-10-27 19:04:10 +11:00
parent 2757dc7205
commit ea54abdfde
2 changed files with 5 additions and 2 deletions

View File

@@ -110,7 +110,8 @@ namespace Wox.Plugin.Program.Logger
private static bool IsKnownUWPProgramError(Exception e, string callingMethodName)
{
if (((e.HResult == -2147024774 || e.HResult == -2147009769) && callingMethodName == "ResourceFromPri")
|| (e.HResult == -2147024894 && (callingMethodName == "LogoPathFromUri" || callingMethodName == "ImageFromPath")))
|| (e.HResult == -2147024894 && (callingMethodName == "LogoPathFromUri" || callingMethodName == "ImageFromPath"))
|| (e.HResult == -2147024864 && callingMethodName == "InitializeAppInfo"))
return true;
if (callingMethodName == "XmlNamespaces")

View File

@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
@@ -86,6 +86,8 @@ namespace Wox.Plugin.Program.Programs
var e = Marshal.GetExceptionForHR((int)hResult);
ProgramLogger.LogException($"|UWP|InitializeAppInfo|{path}" +
"|Error caused while trying to get the details of the UWP program", e);
Apps = new List<Application>().ToArray();
}
}