@@ -343,8 +343,9 @@ public open class JobSupport(active: Boolean) : AbstractCoroutineContextElement(
343343 // otherwise -- do nothing (it was Empty*)
344344 else -> check(expect is Empty )
345345 }
346- // Do other (overridable) processing after completion handlers
346+ // handle onCompletion exceptions
347347 completionException?.let { handleCompletionException(it) }
348+ // Do other (overridable) processing after completion handlers
348349 afterCompletion(update)
349350 }
350351
@@ -497,7 +498,7 @@ public open class JobSupport(active: Boolean) : AbstractCoroutineContextElement(
497498 ? : InvokeOnCompletion (this , handler)
498499
499500 // for nicer debugging
500- override fun toString (): String = " ${javaClass .simpleName} {${describeState(state)} }@${Integer .toHexString(System .identityHashCode(this ))} "
501+ override fun toString (): String = " ${this :: class .java .simpleName} {${describeState(state)} }@${Integer .toHexString(System .identityHashCode(this ))} "
501502
502503 /* *
503504 * Interface for incomplete [state][getState] of a job.
@@ -548,7 +549,7 @@ public open class JobSupport(active: Boolean) : AbstractCoroutineContextElement(
548549 _exception ? : // atomic read volatile var or else create new
549550 CancellationException (" Job was cancelled" ).also { _exception = it }
550551
551- override fun toString (): String = " ${javaClass .simpleName} [$exception ]"
552+ override fun toString (): String = " ${this :: class .java .simpleName} [$exception ]"
552553 }
553554
554555 /* *
@@ -579,7 +580,7 @@ private class InvokeOnCompletion(
579580 val handler : CompletionHandler
580581) : JobNode(job) {
581582 override fun invoke (reason : Throwable ? ) = handler.invoke(reason)
582- override fun toString () = " InvokeOnCompletion[${handler.javaClass .name} @${Integer .toHexString(System .identityHashCode(handler))} ]"
583+ override fun toString () = " InvokeOnCompletion[${handler:: class .java .name} @${Integer .toHexString(System .identityHashCode(handler))} ]"
583584}
584585
585586private class ResumeOnCompletion (
0 commit comments