From 731c3cdcbc23e85b38b3b652d970328adc566675 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=98=E9=9F=AC=20=E5=BC=A0?= Date: Sun, 3 Jan 2021 10:37:36 +0800 Subject: [PATCH] Use OperationCancelledException instead of catch Exception and check --- Flow.Launcher.Core/Plugin/PluginManager.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Flow.Launcher.Core/Plugin/PluginManager.cs b/Flow.Launcher.Core/Plugin/PluginManager.cs index b34995ba6..0712908bf 100644 --- a/Flow.Launcher.Core/Plugin/PluginManager.cs +++ b/Flow.Launcher.Core/Plugin/PluginManager.cs @@ -221,7 +221,7 @@ namespace Flow.Launcher.Core.Plugin metadata.QueryCount == 1 ? milliseconds : (metadata.AvgQueryTime + milliseconds) / 2; token.ThrowIfCancellationRequested(); } - catch (Exception e) when (e is OperationCanceledException || e is TaskCanceledException) + catch (OperationCanceledException) { return results = null; }