Merge pull request #2431 from Flow-Launcher/move-exception-message-to-result

Show a result error instead of popping up dialog
This commit is contained in:
Garulf 2023-12-10 02:57:49 -05:00 committed by GitHub
commit 15b69a2fac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -212,7 +212,19 @@ namespace Flow.Launcher.Core.Plugin
}
catch (Exception e)
{
throw new FlowPluginException(metadata, e);
Result r = new()
{
Title = $"{metadata.Name}: Failed to respond!",
SubTitle = "Select this result for more info",
IcoPath = Flow.Launcher.Infrastructure.Constant.ErrorIcon,
PluginDirectory = metadata.PluginDirectory,
ActionKeywordAssigned = query.ActionKeyword,
PluginID = metadata.ID,
OriginQuery = query,
Action = _ => { throw new FlowPluginException(metadata, e);},
Score = -100
};
results.Add(r);
}
return results;
}