One more point - In try-with-resources it's clear that the try body is
the "main event" while the auto-generated calls to close are intended
to be "cleanup", so it's natural that the try body exception wins.
With whenComplete:
- it's less obvious that the whenComplete action is unimportant
- both CompletionStages may remain accessible so the risk of losing
the source exception is lower, and preserving the integrity of the
source exception is more valuable.

Reply via email to