-
public final class CloseableExtKt
-
-
Method Summary
Modifier and Type Method Description final static <T extends Closeable, R extends Any> RuseMonitored(T $self, SdkCore sdkCore, Function1<T, R> block)Executes the given block function on this Closeable instance and then closes it down correctly whether an exception is thrown or not. -
-
Method Detail
-
useMonitored
final static <T extends Closeable, R extends Any> R useMonitored(T $self, SdkCore sdkCore, Function1<T, R> block)
Executes the given block function on this Closeable instance and then closes it down correctly whether an exception is thrown or not. This extension works exactly as the Closeable.use extension and in case the block will throw any exception this will be intercepted and propagated as a Rum error event.
- Parameters:
sdkCore- the SDK instance to use.block- a function to process this Closeable resource.
-
-
-
-