@@ -343,8 +343,9 @@ public open class JobSupport(active: Boolean) : AbstractCoroutineContextElement(
343
343
// otherwise -- do nothing (it was Empty*)
344
344
else -> check(expect is Empty )
345
345
}
346
- // Do other (overridable) processing after completion handlers
346
+ // handle onCompletion exceptions
347
347
completionException?.let { handleCompletionException(it) }
348
+ // Do other (overridable) processing after completion handlers
348
349
afterCompletion(update)
349
350
}
350
351
@@ -497,7 +498,7 @@ public open class JobSupport(active: Boolean) : AbstractCoroutineContextElement(
497
498
? : InvokeOnCompletion (this , handler)
498
499
499
500
// 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 ))} "
501
502
502
503
/* *
503
504
* Interface for incomplete [state][getState] of a job.
@@ -548,7 +549,7 @@ public open class JobSupport(active: Boolean) : AbstractCoroutineContextElement(
548
549
_exception ? : // atomic read volatile var or else create new
549
550
CancellationException (" Job was cancelled" ).also { _exception = it }
550
551
551
- override fun toString (): String = " ${javaClass .simpleName} [$exception ]"
552
+ override fun toString (): String = " ${this :: class .java .simpleName} [$exception ]"
552
553
}
553
554
554
555
/* *
@@ -579,7 +580,7 @@ private class InvokeOnCompletion(
579
580
val handler : CompletionHandler
580
581
) : JobNode(job) {
581
582
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))} ]"
583
584
}
584
585
585
586
private class ResumeOnCompletion (
0 commit comments