Package kotlin.coroutines.cancellation

Types

CancellationException
Link copied to clipboard
expect open class CancellationException : IllegalStateException

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

Since Kotlin

1.4
actual typealias CancellationException = CancellationException
actual open class CancellationException : IllegalStateException
actual open class CancellationException : IllegalStateException

Functions

CancellationException
Link copied to clipboard
expect fun CancellationException(cause: Throwable?): CancellationException

Creates an instance of CancellationException with the given cause.

Since Kotlin

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

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

Since Kotlin

1.4
actual inline fun CancellationException(cause: Throwable?): CancellationException
actual inline fun CancellationException(message: String?, cause: Throwable?): CancellationException