I have a few questions on handling coroutines canc...
# coroutines
b
I have a few questions on handling coroutines cancellations: do we still need to write runSuspendCatching or this was fixed? Also if we would use arrow's
try
would we have to account for the coroutine or it would catches that?
s
runCatching
still catches everything; that's what it's for. I doubt that would be changed as its behaviour is designed that way for specific use cases. Arrow has special handling so it allows cancellation exceptions and some other "fatal" errors to escape, though.
b
@Sam, why we have the
runSuspendCatching
then?
j
I was about to answer exactly that: we shouldn't use
runCatching
at all in the first place, so I don't believe it's reasonable to have any
runSuspendCatching
or equivalent.
d
I wonder if it would be convenient to have an inspection for this, I saw several in the codebase