From 9ddcf448c66e22ad615fb9f0df8b75574662e96e Mon Sep 17 00:00:00 2001 From: Thorsten Sommer Date: Wed, 23 Apr 2025 13:58:36 +0200 Subject: [PATCH] Improve error logging for invalid plugins by including the first issue in the message --- .../Tools/PluginSystem/PluginFactory.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app/MindWork AI Studio/Tools/PluginSystem/PluginFactory.cs b/app/MindWork AI Studio/Tools/PluginSystem/PluginFactory.cs index 22609319..cb273cee 100644 --- a/app/MindWork AI Studio/Tools/PluginSystem/PluginFactory.cs +++ b/app/MindWork AI Studio/Tools/PluginSystem/PluginFactory.cs @@ -113,13 +113,13 @@ public static partial class PluginFactory LOG.LogError($"Was not able to load plugin: '{pluginMainFile}'. Reason: Unknown."); 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."); - #if DEBUG - foreach (var pluginIssue in plugin.Issues) - LOG.LogError($"Plugin issue: {pluginIssue}"); - #endif - 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. First issue is: {plugin.Issues.FirstOrDefault()}"); + #if DEBUG + foreach (var pluginIssue in plugin.Issues) + LOG.LogError($"Plugin issue: {pluginIssue}"); + #endif + continue; case { IsMaintained: false }: LOG.LogWarning($"The plugin '{pluginMainFile}' is not maintained anymore. Please consider to disable it.");