Add exception logging to ResultHelper catch block

Updated the `catch` block in the `ResultHelper` class to explicitly catch `System.Exception` and log the error using `App.API.LogException`. The log includes the class name, a failure message for querying results, and the exception details. This improves error visibility and debugging.
This commit is contained in:
Jack251970 2025-10-15 12:35:53 +08:00
parent 83cab764a1
commit df4f08b071

View file

@ -36,8 +36,9 @@ public static class ResultHelper
freshResults?.FirstOrDefault(r => r.Title == title && r.SubTitle == subTitle);
}
}
catch
catch (System.Exception e)
{
App.API.LogException(nameof(ResultHelper), $"Failed to query results for {plugin.Metadata.Name}", e);
return null;
}
}