Lucas Romero
10/29/2020, 9:34 AMcoroutineContext
of the failed coroutine in the CoroutineExceptionHandler
, but it seems I can only access the coroutineContext
of the root coroutineScope
there (where the exception handler is installed), is that correct?
The reason I am trying to do this is that I have an MDCContext()
installed in the context that is throwing and I want to be able to log MDC context of the failed coroutine alongside the exception.
That does not work by default because MDCContext will override the MDC context of the leaf coroutine by the context of the parents while bubbling the exception up the scope hierarchy (I think).