How can I use `CoroutineExceptionHandler` in flow?...
# flow
s
How can I use
CoroutineExceptionHandler
in flow? for example
Copy code
val flow = flow { emit("data") }
    .shareIn(viewModelScope, SharingStarted.WhileSubscribed(), 1)
b
Use
catch
on the flow. The
CoroutineExceptionHandler
is a context that is passed to a coroutine.
👀 1