Prefer return value over exception
MODIFY
WalletWasabi/WabiSabi/Client/DependencyGraphTaskScheduler.cs
WalletWasabi/WabiSabi/Client/DependencyGraphTaskScheduler.cs
@@ -186,23 +186,16 @@ public class DependencyGraphTaskScheduler
hdPubKey.SetKeyState(KeyState.Used);
}
- throw;
+ return null;
}
}
).ToImmutableArray();
- try
- {
await Task.WhenAll(tasks).ConfigureAwait(false);
- }
- catch
- {
- // No matter the reason why the output was not registered we should continue.
- }
return tasks
- .Where(x => x.IsCompletedSuccessfully)
- .Select(x => x.Result)
+ .Where(x => x.IsCompletedSuccessfully && x.Result is { })
+ .Select(x => x.Result!)
.ToImmutableList();
}

Prefer return value over exception