From f6f04b209f7f0f9aeecc8c89e688faa3c21f13df Mon Sep 17 00:00:00 2001 From: Abduqodiri Qurbonzoda Date: Thu, 15 Feb 2024 19:39:47 +0200 Subject: [PATCH] [K/N] Remove deprecated setUnhandledExceptionHook(not-null) overload #KT-65532 --- .../runtime/src/main/kotlin/kotlin/native/Runtime.kt | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/kotlin-native/runtime/src/main/kotlin/kotlin/native/Runtime.kt b/kotlin-native/runtime/src/main/kotlin/kotlin/native/Runtime.kt index 300096b08b8..24bf28adebd 100644 --- a/kotlin-native/runtime/src/main/kotlin/kotlin/native/Runtime.kt +++ b/kotlin-native/runtime/src/main/kotlin/kotlin/native/Runtime.kt @@ -60,17 +60,6 @@ public fun setUnhandledExceptionHook(hook: ReportUnhandledExceptionHook?): Repor } } -@Suppress("CONFLICTING_OVERLOADS") -@Deprecated("Provided for binary compatibility", level = DeprecationLevel.HIDDEN) -@OptIn(FreezingIsDeprecated::class, ExperimentalNativeApi::class) -public fun setUnhandledExceptionHook(hook: ReportUnhandledExceptionHook): ReportUnhandledExceptionHook? { - try { - return UnhandledExceptionHookHolder.hook.getAndSet(hook) - } catch (e: InvalidMutabilityException) { - throw InvalidMutabilityException("Unhandled exception hook must be frozen") - } -} - /** * Returns a user-defined unhandled exception hook set by [setUnhandledExceptionHook] or `null` if no user-defined hooks were set. */