W3cubDocs

/Kotlin

CancellationException

Platform and version requirements: JS (1.4), Native (1.4)
@ExperimentalStdlibApi open class CancellationException : 
    IllegalStateException
Platform and version requirements: JVM (1.4)
@ExperimentalStdlibApi typealias CancellationException = CancellationException

Thrown by cancellable suspending functions if the coroutine is cancelled while it is suspended. It indicates normal cancellation of a coroutine.

Constructors

<init>

Platform and version requirements: JS (1.1), Native (1.3)
<init>()
Platform and version requirements: JS (1.1), Native (1.3)
<init>(message: String?)
Platform and version requirements: JS (1.1), Native (1.3)
<init>(message: String?, cause: Throwable?)
Platform and version requirements: JS (1.1), Native (1.3)
<init>(cause: Throwable?)

Extension Functions

Platform and version requirements: Native (1.3)

getStackTraceAddresses

Returns a list of stack trace addresses representing the stack trace pertaining to this throwable.

fun Throwable.getStackTraceAddresses(): List<Long>

© 2010–2020 JetBrains s.r.o. and Kotlin Programming Language contributors
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.coroutines.cancellation/-cancellation-exception/index.html