We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8cced24 commit 669a84fCopy full SHA for 669a84f
reactive/kotlinx-coroutines-reactive/src/Publish.kt
@@ -43,7 +43,7 @@ public fun <T> CoroutineScope.publish(
43
@BuilderInference block: suspend ProducerScope<T>.() -> Unit
44
): Publisher<T> = Publisher { subscriber ->
45
// specification requires NPE on null subscriber
46
- if (subscriber == null) throw NullPointerException("subscriber")
+ if (subscriber == null) throw NullPointerException("Subscriber cannot be null")
47
val newContext = newCoroutineContext(context)
48
val coroutine = PublisherCoroutine(newContext, subscriber)
49
subscriber.onSubscribe(coroutine) // do it first (before starting coroutine), to avoid unnecessary suspensions
0 commit comments