Skip to content

ChannelError

1 min read

Import: import system.task;

Read the usage guide for examples and common tasks. This reference lists the public declarations for this part of the library. See Reading API signatures for parameter and result notation.

ChannelError

Distinguishes backpressure, exhausted inputs, closed endpoints, and cancellation.

public enum ChannelError

Full

The queue has reached its configured capacity.

Full

Empty

No item is available yet.

Empty

Closed

The relevant endpoint has closed.

Closed

Cancelled

The pending operation was cancelled.

Cancelled

InvalidCapacity

A bounded channel was created with a capacity of zero or less.

InvalidCapacity

code

Returns EFULL, EEMPTY, ECLOSED, ECANCELED, or EINVAL for the variant.

public fun code(): string

message

Returns a readable description of the failure.

public fun message(): string