@@ -15,12 +15,12 @@ import kotlin.coroutines.experimental.*
1515 * This class implements completion [Continuation], [Job], and [CoroutineScope] interfaces.
1616 * It stores the result of continuation in the state of the job.
1717 * This coroutine waits for children coroutines to finish before completing and
18- * is cancelled through an intermediate _cancelling_ state.
18+ * fails through an intermediate _failing_ state.
1919 *
2020 * The following methods are available for override:
2121 *
2222 * * [onStart] is invoked when coroutine is create in not active state and is [started][Job.start].
23- * * [onCancellation ] is invoked as soon as coroutine is [cancelled][cancel] (becomes _cancelling_)
23+ * * [onFailing ] is invoked as soon as coroutine is _failing_, or is cancelled,
2424 * or when it completes for any reason.
2525 * * [onCompleted] is invoked when coroutine completes with a value.
2626 * * [onCompletedExceptionally] in invoked when coroutines completes with exception.
@@ -82,10 +82,8 @@ public abstract class AbstractCoroutine<in T>(
8282 * * Cause is an instance of [CancellationException] when job was cancelled _normally_.
8383 * **It should not be treated as an error**. In particular, it should not be reported to error logs.
8484 * * Otherwise, the job had _failed_.
85- *
86- * @suppress **Deprecated**: Override [onFailing].
8785 */
88- override fun onFailing (cause : Throwable ? ) {
86+ protected override fun onFailing (cause : Throwable ? ) {
8987 onCancellation(cause)
9088 }
9189
0 commit comments