Marc Knaup
04/02/2020, 2:05 PMJob.cancel()
throws a CancellationException
itself?
Or is this a bug in Ktor?
java.util.concurrent.CancellationException: Job was cancelled
at io.ktor.client.engine.UtilsKt$attachToUserJob$cleanupHandler$1.invoke(Utils.kt:77)
at io.ktor.client.engine.UtilsKt$attachToUserJob$cleanupHandler$1.invoke(Unknown Source:2)
…
at kotlinx.coroutines.JobSupport.cancel(JobSupport.kt:614)
at kotlinx.coroutines.Job$DefaultImpls.cancel$default(Job.kt:164)
elizarov
04/07/2020, 3:27 PMluke
04/10/2020, 2:15 AMMarc Knaup
04/10/2020, 2:20 AMluke
04/10/2020, 2:27 AMJob
can throw a CancellationException
when calling cancel()
? https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-job/cancel.htmlMarc Knaup
04/10/2020, 2:30 AMluke
04/10/2020, 2:39 AMolegivo
02/14/2023, 1:29 PMkotlin.coroutines.cancellation.CancellationException
but was java.util.concurrent.CancellationException
Something went wrong. I have this bug nowhandleResponseExceptionWithRequest { exception, _ ->
when (exception) {
is java.util.concurrent.CancellationException -> throw kotlin.coroutines.cancellation.CancellationException(exception)
else -> throw exception
}
}