CloseableExtensions extension
Extension methods for Closeable
- on
Methods
-
runAndClose<
R> (R fn(Closeable p0)) → R -
Available on Closeable, provided by the CloseableExtensions extension
Runs passed function and closes this resource after it Closes the resource even if the function throws. The first exception thrown is propagated, if both the function and the close throw, the exception from the function is propagated -
runAndCloseAsync<
R> (FutureOr< R> fn(Closeable p0)) → Future<R> -
Available on Closeable, provided by the CloseableExtensions extension
Runs passed function and closes this resource after it Closes the resource even if the function throws. The first exception thrown is propagated, if both the function and the close throw, the exception from the function is propagated