Skip to content

Commit 18c8a04

Browse files
committed
Log exception
1 parent 0355993 commit 18c8a04

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Flow.Launcher/ViewModel/PluginViewModel.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ namespace Flow.Launcher.ViewModel
1515
{
1616
public partial class PluginViewModel : BaseModel
1717
{
18+
private static readonly string ClassName = nameof(PluginViewModel);
19+
1820
private static readonly Settings Settings = Ioc.Default.GetRequiredService<Settings>();
1921

2022
private readonly PluginPair _pluginPair;
@@ -148,6 +150,10 @@ private static Control TryCreateSettingPanel(PluginPair pair)
148150
}
149151
catch (Exception e)
150152
{
153+
// Log exception
154+
App.API.LogException(ClassName, $"Failed to create setting panel for {pair.Metadata.Name}", e);
155+
156+
// Show error message in UI
151157
var errorMsg = string.Format(App.API.GetTranslation("errorCreatingSettingPanel"),
152158
pair.Metadata.Name, Environment.NewLine, e.Message);
153159
var grid = new Grid()

0 commit comments

Comments
 (0)