Skip to content

Commit 391d355

Browse files
committed
Improve comments
1 parent 60516b4 commit 391d355

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

kotlinx-coroutines-core/common/src/internal/CoroutineExceptionHandlerImpl.kt

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ internal expect fun propagateExceptionToPlatform(context: CoroutineContext, exce
1818
*
1919
* When a callback is registered once, even if it's later removed, the system starts to assume that
2020
* other callbacks will eventually be registered, and so collects the exceptions.
21-
* Once a new callback is registered, it tries.
21+
* Once a new callback is registered, the collected exceptions are used with it.
2222
*
2323
* The callbacks in this object are the last resort before relying on platform-dependent
2424
* ways to report uncaught exceptions from coroutines.
@@ -85,6 +85,7 @@ internal object ExceptionCollector {
8585
}
8686

8787
internal fun handleUncaughtCoroutineException(context: CoroutineContext, exception: Throwable) {
88+
/** this check is purely for the whole [ExceptionCollector] to be eliminated when an Android app is minified. */
8889
if (ANDROID_DETECTED) {
8990
propagateExceptionToPlatform(context, exception)
9091
} else {

0 commit comments

Comments
 (0)