Skip to content

Commit 2e4127c

Browse files
Catch specifc exception
1 parent d2cc576 commit 2e4127c

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

Plugins/Flow.Launcher.Plugin.Explorer/Search/SearchManager.cs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -105,14 +105,16 @@ when ActionKeywordMatch(query, Settings.ActionKeyword.IndexSearchActionKeyword)
105105
await foreach (var search in searchResults.WithCancellation(token).ConfigureAwait(false))
106106
results.Add(ResultManager.CreateResult(query, search));
107107
}
108+
catch (OperationCanceledException)
109+
{
110+
return results.ToList();
111+
}
112+
catch (EngineNotAvailableException)
113+
{
114+
throw;
115+
}
108116
catch (Exception e)
109117
{
110-
if (e is OperationCanceledException)
111-
return results.ToList();
112-
113-
if (e is EngineNotAvailableException)
114-
throw;
115-
116118
throw new SearchException(engineName, e.Message, e);
117119
}
118120

0 commit comments

Comments
 (0)