Package 

Class CatchingKt

    • Method Summary

      Modifier and Type Method Description
      final static <T extends Any> Result<T> runCatchingCancellable(Function0<T> block) Runs a block and returns a Result with proper cancellation semantics:
      • On success: Result.success(Unit).

      • On cancellation: rethrowsCancellationException.

      • On other exceptions: Result.failure(cause).

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • runCatchingCancellable

         final static <T extends Any> Result<T> runCatchingCancellable(Function0<T> block)

        Runs a block and returns a Result with proper cancellation semantics:

        • On success: Result.success(Unit).

        • On cancellation: rethrowsCancellationException.

        • On other exceptions: Result.failure(cause).