Kristian Nedrevold
09/13/2022, 8:20 PMmkrussel
09/13/2022, 8:43 PMgetSuppressed
function on Throwable
to see anything that was suppressed.Kristian Nedrevold
09/13/2022, 8:59 PMmkrussel
09/13/2022, 9:28 PMmkrussel
09/13/2022, 9:30 PMuse
will throw any exception thrown by your block or by the close
function of the Closable
.
If they both throw exceptions, then the one thrown by your code block, will have the one from the close
added to it as a suppressed exception.mkrussel
09/13/2022, 9:31 PMKristian Nedrevold
09/14/2022, 10:28 AM