Fonctionnel Java - l'Interaction entre les whenComplete et exceptionnellement

Dans ce code:

doSomethingThatMightThrowAnException()
  .whenComplete((result, ex) -> doSomethingElse()})
  .exceptionally(ex -> handleException(ex));

Quand il y a une exception de doSomethingThatMightThrowAnException, sont à la fois doSomethingElse et handleException exécuter, ou est l'exception consommée par le whenComplete ou la exceptionally?

EDIT:

doSomethingThatMightThrowAnException renvoie une CompletableFuture, qui pourrait completeExceptionally. C'est l'exception dont je parle.

OriginalL'auteur peco | 2015-07-10