Cancellation Swallowed (ARCH8168)
Ce contenu n’est pas encore disponible dans votre langue.
Key kotlin.logging.cancellation-swallowed · Severity warning · Category logging
Flags catch blocks that catch CancellationException / InterruptedException without rethrowing or re-interrupting - cancellation stops propagating.
Incorrect
Section titled “Incorrect”catch (e: CancellationException) { log.warn("cancelled") }Correct
Section titled “Correct”catch (e: CancellationException) { cleanup(); throw e }Rethrow CancellationException; for InterruptedException call Thread.currentThread().interrupt().