CancellationException

open expect class CancellationException : 
    IllegalStateException
(source)

Constructors

<init>

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

Thrown by cancellable suspending functions if the Job of the coroutine is cancelled while it is suspending. It indicates normal cancellation of a coroutine. It is not printed to console/log by default uncaught exception handler. (see CoroutineExceptionHandler).

Extension Functions

id

external fun Any.id(): Int

Inheritors

TimeoutCancellationException

class TimeoutCancellationException : 
    CancellationException,
    CopyableThrowable<TimeoutCancellationException>

This exception is thrown by withTimeout to indicate timeout.