https://kotlinlang.org logo
#coroutines
Title
# coroutines
v

Vaibhav Nalawade

10/11/2022, 2:25 AM
Emit from a catch block is bad practice ? Android developer guide says it not https://developer.android.com/kotlin/flow
K 1
g

gildor

10/11/2022, 3:52 AM
Why is it a bad practice? Really think it depends on your case
i

Ian Lake

10/11/2022, 5:04 AM
This is exactly what the
Flow.catch
operator is for - to transform or map exceptions thrown upstream into something appropriate for downstream consumers: https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/catch.html
3 Views