closeFinally

inline fun <T> T.closeFinally(cause: Throwable?, close: T.() -> Unit)(source)

Deprecated

See https://kotlinlang.org/docs/whatsnew20.html#stable-autocloseable-interface

Copied and adapted from kotlin.closeFinally.