W3cubDocs

/Kotlin

Package kotlin.coroutines.cancellation

Exceptions

CancellationException

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

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

Functions

Platform and version requirements: JVM (1.4)

CancellationException

Creates an instance of CancellationException with the given message and cause.

fun CancellationException(
    message: String?, 
    cause: Throwable?
): CancellationException

Creates an instance of CancellationException with the given cause.

fun CancellationException(
    cause: Throwable?
): CancellationException

© 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/index.html