From 04ef371337dab806b94531f3b5a829bfc1dbe10f Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Sat, 5 Jun 2021 15:18:09 +0600 Subject: [PATCH] update safelyWithResult --- .../kotlin/dev/inmo/micro_utils/coroutines/HandleSafely.kt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/coroutines/src/commonMain/kotlin/dev/inmo/micro_utils/coroutines/HandleSafely.kt b/coroutines/src/commonMain/kotlin/dev/inmo/micro_utils/coroutines/HandleSafely.kt index 4714210efb4..8fb0d3ad3f9 100644 --- a/coroutines/src/commonMain/kotlin/dev/inmo/micro_utils/coroutines/HandleSafely.kt +++ b/coroutines/src/commonMain/kotlin/dev/inmo/micro_utils/coroutines/HandleSafely.kt @@ -117,9 +117,7 @@ suspend inline fun runCatchingSafely( suspend inline fun safelyWithResult( noinline block: suspend CoroutineScope.() -> T -): Result = runCatching { - safely({ throw it }, block) -} +): Result = runCatchingSafely(defaultSafelyExceptionHandler, block) /** * Use this handler in cases you wish to include handling of exceptions by [defaultSafelyWithoutExceptionHandler] and