await Error
suspend fun <T> ReceiveChannel<T>.awaitError(name: String? = null): Throwable
Content copied to clipboard
Assert that attempting to read from the ReceiveChannel yields an exception, indicating that it was closed with an exception.
Throws
if the next event was an item or completion.