You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 2, 2023. It is now read-only.
i.e. original exception is not overwritten for next stages.
So probably it makes sense to use handleFailure(nextStage, failure); to propagate original exception (as CompletableFuture does). Personally, in my own library I've added exception from handler as suppressed exception to failure and forward failure to next stages.
By the way, handle family of methods of CompletableFuture in fact overrides original exception (though, this is undocumented).
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Here is a code snippet (from SimpleCompletionStage):
However, for
CompletableFuture
it's different:https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletableFuture.html#whenComplete-java.util.function.BiConsumer-
i.e. original exception is not overwritten for next stages.
So probably it makes sense to use
handleFailure(nextStage, failure);
to propagate original exception (as CompletableFuture does). Personally, in my own library I've added exception from handler as suppressed exception to failure and forward failure to next stages.By the way,
handle
family of methods ofCompletableFuture
in fact overrides original exception (though, this is undocumented).The text was updated successfully, but these errors were encountered: