Skip to content

Commit ab7685e

Browse files
committed
Show a result error instead of popping up dialog
1 parent 57541b3 commit ab7685e

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

Flow.Launcher.Core/Plugin/PluginManager.cs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,18 @@ public static async Task<List<Result>> QueryForPluginAsync(PluginPair pair, Quer
210210
}
211211
catch (Exception e)
212212
{
213-
throw new FlowPluginException(metadata, e);
213+
Result r = new()
214+
{
215+
Title = $"{metadata.Name}: {e.GetType().Name}",
216+
SubTitle = "ERROR: There was an error loading this plugin!",
217+
IcoPath = "Images\\app_error.png",
218+
PluginDirectory = metadata.PluginDirectory,
219+
ActionKeywordAssigned = query.ActionKeyword,
220+
PluginID = metadata.ID,
221+
OriginQuery = query,
222+
Action = _ => { throw new FlowPluginException(metadata, e);}
223+
};
224+
results.Add(r);
214225
}
215226
return results;
216227
}

0 commit comments

Comments
 (0)