GetProcessesSafe: better exception logging

This commit is contained in:
pizzaboxer 2024-05-05 11:57:48 +01:00 committed by GitHub
parent 6e95046af2
commit 6e022310a5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -85,7 +85,8 @@ namespace Bloxstrap
}
catch (ArithmeticException ex) // thanks microsoft
{
App.Logger.WriteLine(LOG_IDENT, $"Arithmetic exception occured with System.Diagnostics.Process.GetProcesses: {ex}");
App.Logger.WriteLine(LOG_IDENT, $"Unable to fetch processes!");
App.Logger.WriteException(LOG_IDENT, ex);
return Array.Empty<Process>(); // can we retry?
}
}