Package kotlin.coroutines.cancellation

Types

CancellationException
Link copied to clipboard
Common
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
open class CancellationException : IllegalStateException
open class CancellationException : IllegalStateException
typealias CancellationException = CancellationException

Functions

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

Creates an instance of CancellationException with the given cause.

Since Kotlin

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

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

Since Kotlin

1.4