CancellationError

An error that indicates a task was canceled.

iOS
13.0+
macOS
10.15+
tvOS
13.0+
watchOS
6.0+
struct CancellationError

This error is also thrown automatically by Task.checkCancellation(), if the current task has been canceled.

Citizens in _Concurrency

Conformances

  • protocol Error

    A type representing an error value that can be thrown.

  • protocol Sendable

    A thread-safe type whose values can be shared across arbitrary concurrent contexts without introducing a risk of data races. Values of the type may have no shared mutable state, or they may protect that state with a lock or by forcing it to only be accessed from a specific actor.

Type members