I'm converting some RxJava code to Kotlin Flow in a project.
I came across a piece of code where BehaviorSubject#onError(Throwable)
was being called.
I didn't find any way to do it with a Flow
object.
// RxJava
val behaviorSubject = BehaviorSubject.create<Int>()
behaviorSubject.onError(RuntimeException())
// Kotlin Flow
val mutableSharedFlow = MutableSharedFlow<Int>()
mutableSharedFlow.???
Is there any way to do it?