mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 11:48:06 +01:00
catch unhandled FileNotFoundException exception (#6456)
This commit is contained in:
committed by
GitHub
parent
936b02865f
commit
f61e9d389f
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user