diff --git a/CHANGELOG.md b/CHANGELOG.md index 72c36999..e378f874 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### Enhancements + +- Make `setSentryUnhandledExceptionHook` public ([#208](https://github.com/getsentry/sentry-kotlin-multiplatform/pull/208)) + ### Dependencies - Bump Java SDK from v7.4.0 to v7.8.0 ([#205](https://github.com/getsentry/sentry-kotlin-multiplatform/pull/205), [#206](https://github.com/getsentry/sentry-kotlin-multiplatform/pull/206)) diff --git a/sentry-kotlin-multiplatform/src/appleMain/kotlin/io/sentry/kotlin/multiplatform/nsexception/SentryUnhandledExceptions.kt b/sentry-kotlin-multiplatform/src/appleMain/kotlin/io/sentry/kotlin/multiplatform/nsexception/SentryUnhandledExceptions.kt index d090381e..9f8619c6 100644 --- a/sentry-kotlin-multiplatform/src/appleMain/kotlin/io/sentry/kotlin/multiplatform/nsexception/SentryUnhandledExceptions.kt +++ b/sentry-kotlin-multiplatform/src/appleMain/kotlin/io/sentry/kotlin/multiplatform/nsexception/SentryUnhandledExceptions.kt @@ -49,7 +49,7 @@ internal fun dropKotlinCrashEvent(event: SentryEvent?): SentryEvent? { * Note: once the exception is logged the program will be terminated. * @see wrapUnhandledExceptionHook */ -internal fun setSentryUnhandledExceptionHook(): Unit = wrapUnhandledExceptionHook { throwable -> +public fun setSentryUnhandledExceptionHook(): Unit = wrapUnhandledExceptionHook { throwable -> val envelope = throwable.asSentryEnvelope() // The envelope will be persisted, so we can safely terminate afterwards. // https://github.com/getsentry/sentry-cocoa/blob/678172142ac1d10f5ed7978f69d16ab03e801057/Sources/Sentry/SentryClient.m#L409