mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Catch specifc exception
This commit is contained in:
parent
d2cc5760ca
commit
2e4127c63b
1 changed files with 8 additions and 6 deletions
|
|
@ -105,14 +105,16 @@ namespace Flow.Launcher.Plugin.Explorer.Search
|
||||||
await foreach (var search in searchResults.WithCancellation(token).ConfigureAwait(false))
|
await foreach (var search in searchResults.WithCancellation(token).ConfigureAwait(false))
|
||||||
results.Add(ResultManager.CreateResult(query, search));
|
results.Add(ResultManager.CreateResult(query, search));
|
||||||
}
|
}
|
||||||
|
catch (OperationCanceledException)
|
||||||
|
{
|
||||||
|
return results.ToList();
|
||||||
|
}
|
||||||
|
catch (EngineNotAvailableException)
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
if (e is OperationCanceledException)
|
|
||||||
return results.ToList();
|
|
||||||
|
|
||||||
if (e is EngineNotAvailableException)
|
|
||||||
throw;
|
|
||||||
|
|
||||||
throw new SearchException(engineName, e.Message, e);
|
throw new SearchException(engineName, e.Message, e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue