ClosedReceiveChannelException

Indicates an attempt to receive from a closed-for-receiving channel that was closed without a cause.

If a clause was provided, that clause is thrown from receive instead of this exception. In particular, if the channel was closed because it was cancelled, this exception will never be thrown: either the cause of the cancellation is thrown, or a new CancellationException gets constructed to be thrown from ReceiveChannel.receive.

This exception is a subclass of NoSuchElementException to be consistent with plain collections.

Constructors

Link copied to clipboard
constructor(message: String?)