onReceiveCatching

Clause for the select expression of the receiveCatching suspending function that selects with a ChannelResult when an element is retrieved or the channel gets closed.

Like receiveCatching, onReceiveCatching obeys the rules of prompt cancellation: select may finish with a CancellationException even if an element was successfully retrieved, in which case the onUndeliveredElement callback will be called.