From 54917904edb91f4c859db5f0e34ad8770cbe2dbf Mon Sep 17 00:00:00 2001 From: Vsevolod Tolstopyatov Date: Thu, 2 Jul 2020 02:49:43 -0700 Subject: [PATCH] Common CancellationException (#4265) (cherry picked from commit 7e94cea06e9f87f74a79db30e672e3ca1d280860) --- .../{ => cancellation}/CancellationException.kt | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) rename runtime/src/main/kotlin/kotlin/coroutines/{ => cancellation}/CancellationException.kt (52%) diff --git a/runtime/src/main/kotlin/kotlin/coroutines/CancellationException.kt b/runtime/src/main/kotlin/kotlin/coroutines/cancellation/CancellationException.kt similarity index 52% rename from runtime/src/main/kotlin/kotlin/coroutines/CancellationException.kt rename to runtime/src/main/kotlin/kotlin/coroutines/cancellation/CancellationException.kt index 2d0d62ad432..445742edda1 100644 --- a/runtime/src/main/kotlin/kotlin/coroutines/CancellationException.kt +++ b/runtime/src/main/kotlin/kotlin/coroutines/cancellation/CancellationException.kt @@ -5,14 +5,11 @@ package kotlin.coroutines.cancellation -/** - * Thrown by cancellable suspending functions if the coroutine is cancelled while it is suspended. - * It indicates _normal_ cancellation of a coroutine. - */ +@ExperimentalStdlibApi @SinceKotlin("1.4") -public open class CancellationException : IllegalStateException { - constructor() : super() - constructor(message: String?) : super(message) +public actual open class CancellationException : IllegalStateException { + actual constructor() : super() + actual constructor(message: String?) : super(message) constructor(message: String?, cause: Throwable?) : super(message, cause) constructor(cause: Throwable?) : super(cause) }