added catch

This commit is contained in:
AT 2019-12-14 00:41:29 +02:00
parent e6e1aab098
commit 4c2a09369d

View File

@ -397,6 +397,8 @@ namespace Wox.ViewModel
{
// so looping will stop once it was cancelled
var parallelOptions = new ParallelOptions { CancellationToken = currentCancellationToken };
try
{
Parallel.ForEach(plugins, parallelOptions, plugin =>
{
var config = _settings.PluginSettings.Plugins[plugin.Metadata.ID];
@ -406,6 +408,12 @@ namespace Wox.ViewModel
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
// until the end of all querying