I'm confused by the new `getCancellationException`...
# coroutines
l
I'm confused by the new
getCancellationException
method on
Job
. Previously,
getCompletionException
would return
CancellationException
if the job was canceled with a call to
cancel
and the exception thrown in the coroutine body if it crashed with an uncaught exception. Now I'm told to replace this call with the new method, which always returns a
CancellationException
, whether the coroutine crashed or we canceled it. What's the correct way to distinguish between these two cases?