so usually in my code when I handle exceptions in ...
# coroutines
r
so usually in my code when I handle exceptions in a suspend function, I always first check if the exception is a cancellation exception before trying to log or otherwise. If it's CancellationException I just rethrow. Is this what others do? Is there a more... idiomatic/simple way to do this? It's a very common pattern for me (or maybe I'm just handling things incorrectly).
o
unfortunately not right now, https://github.com/Kotlin/kotlinx.coroutines/issues/1814 is the related issue
r
ah @octylFractal thanks for the link. I actually started to write my own runCatching function to handle this situation too. I'll go post my own comment on that issue.
👍 1