When dealing with `callbackFlow`, I now saw two di...
# coroutines
s
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
The second one. I think the first one is deprecated or has bad semantics.
👍🏼 1