catch unhandled FileNotFoundException exception (#6456)

This commit is contained in:
Divyansh Srivastava
2020-09-09 11:33:28 -07:00
committed by GitHub
parent 936b02865f
commit f61e9d389f

View File

@@ -484,6 +484,14 @@ namespace Microsoft.Plugin.Program.Programs
return new Win32Program() { Valid = false, Enabled = false }; return new Win32Program() { Valid = false, Enabled = false };
} }
catch (FileNotFoundException e)
{
ProgramLogger.LogException(
$"|Win32|ExeProgram|{path}" +
$"|Unable to locate exe file at {path}", e);
return new Win32Program() { Valid = false, Enabled = false };
}
} }
// Function to get the Win32 application, given the path to the application // Function to get the Win32 application, given the path to the application