From 18c8a04cbcc5fe062730abef62af7c0760682eae Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Mon, 15 Sep 2025 21:46:03 +0800 Subject: [PATCH] Log exception --- Flow.Launcher/ViewModel/PluginViewModel.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Flow.Launcher/ViewModel/PluginViewModel.cs b/Flow.Launcher/ViewModel/PluginViewModel.cs index 4de1ae661..59bb53a4a 100644 --- a/Flow.Launcher/ViewModel/PluginViewModel.cs +++ b/Flow.Launcher/ViewModel/PluginViewModel.cs @@ -15,6 +15,8 @@ namespace Flow.Launcher.ViewModel { public partial class PluginViewModel : BaseModel { + private static readonly string ClassName = nameof(PluginViewModel); + private static readonly Settings Settings = Ioc.Default.GetRequiredService(); private readonly PluginPair _pluginPair; @@ -148,6 +150,10 @@ namespace Flow.Launcher.ViewModel } catch (Exception e) { + // Log exception + App.API.LogException(ClassName, $"Failed to create setting panel for {pair.Metadata.Name}", e); + + // Show error message in UI var errorMsg = string.Format(App.API.GetTranslation("errorCreatingSettingPanel"), pair.Metadata.Name, Environment.NewLine, e.Message); var grid = new Grid()