Skip to content

Commit 15b69a2

Browse files
authored
Merge pull request #2431 from Flow-Launcher/move-exception-message-to-result
Show a result error instead of popping up dialog
2 parents 9459a37 + ba45069 commit 15b69a2

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

Flow.Launcher.Core/Plugin/PluginManager.cs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,19 @@ public static async Task<List<Result>> QueryForPluginAsync(PluginPair pair, Quer
212212
}
213213
catch (Exception e)
214214
{
215-
throw new FlowPluginException(metadata, e);
215+
Result r = new()
216+
{
217+
Title = $"{metadata.Name}: Failed to respond!",
218+
SubTitle = "Select this result for more info",
219+
IcoPath = Flow.Launcher.Infrastructure.Constant.ErrorIcon,
220+
PluginDirectory = metadata.PluginDirectory,
221+
ActionKeywordAssigned = query.ActionKeyword,
222+
PluginID = metadata.ID,
223+
OriginQuery = query,
224+
Action = _ => { throw new FlowPluginException(metadata, e);},
225+
Score = -100
226+
};
227+
results.Add(r);
216228
}
217229
return results;
218230
}

0 commit comments

Comments
 (0)