From ab7685e9ea9bf58a4f1bf3c519ca7cebd1ca1880 Mon Sep 17 00:00:00 2001 From: Garulf <535299+Garulf@users.noreply.github.com> Date: Sat, 18 Nov 2023 21:45:06 -0500 Subject: [PATCH] Show a result error instead of popping up dialog --- Flow.Launcher.Core/Plugin/PluginManager.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Flow.Launcher.Core/Plugin/PluginManager.cs b/Flow.Launcher.Core/Plugin/PluginManager.cs index f8c9a3f17..31ded2baf 100644 --- a/Flow.Launcher.Core/Plugin/PluginManager.cs +++ b/Flow.Launcher.Core/Plugin/PluginManager.cs @@ -210,7 +210,18 @@ namespace Flow.Launcher.Core.Plugin } catch (Exception e) { - throw new FlowPluginException(metadata, e); + Result r = new() + { + Title = $"{metadata.Name}: {e.GetType().Name}", + SubTitle = "ERROR: There was an error loading this plugin!", + IcoPath = "Images\\app_error.png", + PluginDirectory = metadata.PluginDirectory, + ActionKeywordAssigned = query.ActionKeyword, + PluginID = metadata.ID, + OriginQuery = query, + Action = _ => { throw new FlowPluginException(metadata, e);} + }; + results.Add(r); } return results; }