https://kotlinlang.org logo
Title
m

marcoferrer

03/01/2019, 5:02 PM
I was trying something like this but noticed that the exception is already unwrapped at this point.
coroutineContext[Job]?.invokeOnCompletion {
        if(it is CancellationException){
            call.cancel(it.message,it.cause ?: it)
        }
    }
add a CoroutineExceptionHandler to your context
d

Dico

03/02/2019, 1:29 PM
That's not a cancellation handler @withoutclass. Cancellation exceptions are considered "normal".
w

withoutclass

03/02/2019, 8:40 PM
Ah, my mistake.