dave08
01/30/2018, 3:52 AMpublic actual inline fun CoroutineExceptionHandler(crossinline handler: (CoroutineContext, Throwable) -> Unit): CoroutineExceptionHandler =
object: AbstractCoroutineContextElement(CoroutineExceptionHandler), CoroutineExceptionHandler {
override fun handleException(context: CoroutineContext, exception: Throwable) =
handler.invoke(context, exception)
}
I think you were missing the CoroutineContext's element key companion object, which is what replaces your context with the default one in the lib, but the above should do the trick...groostav
01/30/2018, 7:22 AMrunBlocking(Handler)
it still doesnt get calledgroostav
01/30/2018, 7:44 AMrunBlocking
builder, where the exception-handler only gets notified on launch
blocks?dave08
01/30/2018, 7:59 AMdave08
01/30/2018, 8:05 AMwithContext
, maybe that'll help?