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

bitkid

04/05/2018, 11:30 AM
hey guys. i have a question (which might be rather stupid). why does this test does not throw a TimeoutCancelationException?
l

louiscad

04/05/2018, 5:36 PM
@bitkid Because `CancellationException`s (including subclasses) are eaten by coroutine launchers like
runBlocking
and
launch
since they are a proper way to gently cancel a coroutine. Other exception types are not caught by the coroutine launcher.
2 Views