mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-10 05:06:36 +02:00
added catch
This commit is contained in:
@@ -397,6 +397,8 @@ 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 };
|
||||||
|
try
|
||||||
|
{
|
||||||
Parallel.ForEach(plugins, parallelOptions, plugin =>
|
Parallel.ForEach(plugins, parallelOptions, plugin =>
|
||||||
{
|
{
|
||||||
var config = _settings.PluginSettings.Plugins[plugin.Metadata.ID];
|
var config = _settings.PluginSettings.Plugins[plugin.Metadata.ID];
|
||||||
@@ -406,6 +408,12 @@ namespace Wox.ViewModel
|
|||||||
UpdateResultView(results, plugin.Metadata, 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