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 92f43522de7..bc662e79086 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 @@ -39,11 +39,9 @@ object ContextSafelyExceptionHandlerKey : CoroutineContext.Key -) : CoroutineContext.Element, CoroutineExceptionHandler { +) : CoroutineContext.Element { override val key: CoroutineContext.Key<*> get() = ContextSafelyExceptionHandlerKey - - override fun handleException(context: CoroutineContext, exception: Throwable) = handler(exception) } /** @@ -150,9 +148,9 @@ suspend inline fun runCatchingSafelyWithoutExceptions( safelyWithoutExceptions(onException, block) } -suspend inline fun CoroutineScope( +inline fun CoroutineScope( context: CoroutineContext, - defaultExceptionsHandler: ExceptionHandler + noinline defaultExceptionsHandler: ExceptionHandler ) = CoroutineScope( context + ContextSafelyExceptionHandler(defaultExceptionsHandler) ) diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 05679dc3c18..ffed3a254e9 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists