mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
AsyncExecutionSupport: Don't log CancellationException as error
As of v0.25.0 CancellationException are not processed by CoroutineExceptionHandler. Until then we need to ignore it explicitly. Follow-up: IDEA-CR-36112 AsyncExecutionSupport: Adapt to launch/async/withContext API, add tests
This commit is contained in:
+1
@@ -70,6 +70,7 @@ internal abstract class AsyncExecutionSupport<E : AsyncExecution<E>> : AsyncExec
|
||||
// MUST NOT throw. See https://github.com/Kotlin/kotlinx.coroutines/issues/562
|
||||
// #562 "Exceptions thrown by CoroutineExceptionHandler must be caught by handleCoroutineException()"
|
||||
protected open fun handleUncaughtException(coroutineContext: CoroutineContext, throwable: Throwable) {
|
||||
if (throwable is CancellationException) return // TODO[eldar] remove once updated to kotlinx.coroutines v0.25.0
|
||||
try {
|
||||
LOG.error("Uncaught exception from $coroutineContext", throwable) // throws AssertionError in unit testing mode
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user