Improve error logging for invalid plugins by including the first issue in the message

This commit is contained in:
Thorsten Sommer 2025-04-23 13:58:36 +02:00
parent 9cf4f943fb
commit 9ddcf448c6
Signed by: tsommer
GPG Key ID: 371BBA77A02C0108

View File

@ -114,7 +114,7 @@ public static partial class PluginFactory
continue;
case { IsValid: false }:
LOG.LogError($"Was not able to load plugin '{pluginMainFile}', because the Lua code is not a valid AI Studio plugin. There are {plugin.Issues.Count()} issues to fix.");
LOG.LogError($"Was not able to load plugin '{pluginMainFile}', because the Lua code is not a valid AI Studio plugin. There are {plugin.Issues.Count()} issues to fix. First issue is: {plugin.Issues.FirstOrDefault()}");
#if DEBUG
foreach (var pluginIssue in plugin.Issues)
LOG.LogError($"Plugin issue: {pluginIssue}");