mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-08 04:07:40 +02:00
added catch
This commit is contained in:
@@ -397,15 +397,23 @@ namespace Wox.ViewModel
|
|||||||
{
|
{
|
||||||
// so looping will stop once it was cancelled
|
// so looping will stop once it was cancelled
|
||||||
var parallelOptions = new ParallelOptions { CancellationToken = currentCancellationToken };
|
var parallelOptions = new ParallelOptions { CancellationToken = currentCancellationToken };
|
||||||
Parallel.ForEach(plugins, parallelOptions, plugin =>
|
try
|
||||||
{
|
{
|
||||||
var config = _settings.PluginSettings.Plugins[plugin.Metadata.ID];
|
Parallel.ForEach(plugins, parallelOptions, plugin =>
|
||||||
if (!config.Disabled)
|
|
||||||
{
|
{
|
||||||
var results = PluginManager.QueryForPlugin(plugin, query);
|
var config = _settings.PluginSettings.Plugins[plugin.Metadata.ID];
|
||||||
UpdateResultView(results, plugin.Metadata, query);
|
if (!config.Disabled)
|
||||||
}
|
{
|
||||||
});
|
var results = PluginManager.QueryForPlugin(plugin, query);
|
||||||
|
UpdateResultView(results, plugin.Metadata, query);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
catch (OperationCanceledException)
|
||||||
|
{
|
||||||
|
// nothing to do here
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// this should happen once after all queries are done so progress bar should continue
|
// this should happen once after all queries are done so progress bar should continue
|
||||||
// until the end of all querying
|
// until the end of all querying
|
||||||
|
|||||||
Reference in New Issue
Block a user