Skip to content

Commit 7fffa11

Browse files
qwwdfsadpablobaxter
authored andcommitted
Handle exceptions on K/N by invoking 'processUnhandledException' (Kotlin#2981)
1 parent 02245a2 commit 7fffa11

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

kotlinx-coroutines-core/native/src/CoroutineExceptionHandlerImpl.kt

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@
55
package kotlinx.coroutines
66

77
import kotlin.coroutines.*
8+
import kotlin.native.*
89

910
internal actual fun initializeDefaultExceptionHandlers() {
1011
// Do nothing
1112
}
1213

14+
@OptIn(ExperimentalStdlibApi::class)
1315
internal actual fun handleCoroutineExceptionImpl(context: CoroutineContext, exception: Throwable) {
1416
// log exception
15-
exception.printStackTrace()
17+
processUnhandledException(exception)
1618
}

0 commit comments

Comments
 (0)