Open fzakaria opened 8 years ago
Shouldn't it be returning https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletionException.html ? Also, exceptionally() and handle() should be able to chain actions on exceptions ?
@zbard i think it wasn't clear if multiple exceptionally blocks exist how they occur and the fact that the ordering of exceptionally & compose matter. I've seen other future libraries better address this.
Ah, that makes sense. Which future libraries are you thinking of ?
Not sure - haven't looked at options yet. I know internally at my current company they've done something similar so that's how I've come across this problem.
Farid Zakaria
On Tue, May 10, 2016 at 10:01 PM, Akshat Kumar notifications@github.com wrote:
Ah, that makes sense. Which future libraries are you thinking of ?
— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/fzakaria/WaterFlow/issues/1#issuecomment-218362231
CompletionStage has a few hairy bits, especially with what it does with exceptions (swallows them!) There are other libraries out there that are a bit more idiomatic in how the Futures are composable and the exceptions are chained.
Consider moving to them.