CLOVIS
10/17/2020, 12:21 PMFlow.flatMapMerge
?
I have this:
val f: Flow<CustomObject> = ...
f.flatMapMerge {
it.customFlow()
}
This works fine as long as there is no exception, however if there is one, the entire flow is cancelled. I tried to write
f.flatMapMerge {
try {
it.customFlow()
} catch(e: Throwable) {
println("Caught")
emptyFlow()
}
}
but that still cancels the flow, instead of just skipping items for which the conversion fails..catch
after the .flatMapMerge
, the flow has still been cancelled.Zach Klippenstein (he/him) [MOD]
10/17/2020, 2:44 PMCLOVIS
10/17/2020, 5:39 PM