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

svenjacobs

09/06/2019, 6:01 AM
When dealing with
callbackFlow
, I now saw two different "official" approaches of how to deal with upstream exceptions returned by the wrapped callback. Should I either call
close(exception)
or
cancel(CancellationException("Error occurred", exception))
?
👀 1
d

Dominaezzz

09/06/2019, 10:37 AM
The second one. I think the first one is deprecated or has bad semantics.
👍🏼 1
2 Views