closeWhileHandlingException

Closes all given AutoCloseables, suppressing all thrown exceptions. Some of the objects may be null; they are ignored.


@JvmName(name = "closeWhileHandlingExceptionNullable")
fun closeWhileHandlingException(vararg objects: AutoCloseable?)
fun closeWhileHandlingException(closable: Closeable)


Closes all given AutoCloseables, suppressing all thrown non-Error exceptions. :contentReferenceoaicite:1{index=1} Even if a VirtualMachineError (or equivalent fatal Error) is thrown, all given resources are closed.