mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-11-24 20:29:08 +08:00
catch unhandled FileNotFoundException exception (#6456)
This commit is contained in:
parent
936b02865f
commit
f61e9d389f
@ -484,6 +484,14 @@ namespace Microsoft.Plugin.Program.Programs
|
||||
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user