Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.5.0-beta-1
-
None
Description
As with the try-with-resources statement, if multiple exceptions are thrown the exception from the closure should be returned and the exception from closing should be added as a suppressed exception.
Currently the withCloseable/withAutoCloseable method return the closure exception and log a warning if an exception is thrown on the call to close(). With this improvement the exception from close() would also be added as a suppressed exception to the exception thrown from the closure.
Attachments
Issue Links
- links to