What doesn't work properly? Why are you switching over the cause? If you want to do some specific handling based on the particular subtask, you could examine their individual results, but the natural thing is obviously to handle the exception in the subtask (in the sequential analogue, a catch block outside a loop, you also don't know which iteration threw the exception, and if you do care about that, you'd similarly move the catch inside the loop). For extra composable configurability you have the joiner.
9
u/javaprof 4d ago
So checked exceptions doesn't work properly here too?
This is very funny: