I do believe that documentation for `getCancellati...
# coroutines
e
I do believe that documentation for
getCancellationException
explains the purpose and behavior for this method quite well. Maybe we should rename it to reduce ambiguity and prevent its abuse? https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.experimental/-job/get-cancellation-exception.html
l
I had previously read that documentation and found it confusing to read so went the guess and check route. I've revisited it and still find it confusing. Specifically, "if it is an instance of CancellationException", does this mean if one called
job.cancel(CancellationException())
? It would also be clearer to separate the sentence: "Otherwise it returns an instance of JobCancellationException..." (at least that's how I'm reading it). Also, coming back to the original issue at hand, it doesn't mention anything about
cause
.
l
yes that is much clearer!! thanks again