Aidan Low
04/29/2022, 2:07 PMtry {
foo()
} catch (ex: Exception) {
// ignore failures, best effort
}
but if I'm inside a coroutine, will this screw up cooperative cancellation? Do I need to do something like
try {
foo()
} catch (ex: CancellationException) {
throw ex
} catch (ex: Exception) {
// ignore failures, best effort
}
?Tijl
04/29/2022, 2:09 PMAidan Low
04/29/2022, 2:28 PMephemient
04/29/2022, 3:43 PMAidan Low
04/29/2022, 5:15 PMthat also screws up Java thread interruptionWill that be handled by re-throwing CancellationException as in my second block of code?
Aidan Low
04/29/2022, 5:15 PMephemient
04/29/2022, 5:26 PMephemient
04/29/2022, 5:27 PMAidan Low
04/29/2022, 5:28 PM