Skip to content

Commit cd00301

Browse files
committed
Increase deprecation level of Job.cancel(cause) to ERROR
1 parent 85aa46d commit cd00301

File tree

1 file changed

+5
-2
lines changed
  • kotlinx-coroutines-core/common/src

1 file changed

+5
-2
lines changed

kotlinx-coroutines-core/common/src/Job.kt

+5-2
Original file line numberDiff line numberDiff line change
@@ -169,10 +169,13 @@ public interface Job : CoroutineContext.Element {
169169
public fun cancel(): Unit
170170

171171
/**
172-
* @suppress
172+
* @suppress **Deprecated**: This function is obsolete.
173+
* Use [CompletableJob.completeExceptionally] or [CompletableDeferred.completeExceptionally] with exception,
174+
* or [Job.cancel] without exception instead.
173175
*/
174176
@ObsoleteCoroutinesApi
175-
@Deprecated(level = DeprecationLevel.WARNING, message = "Use CompletableDeferred.completeExceptionally(cause) or Job.cancel() instead",
177+
@Deprecated(level = DeprecationLevel.ERROR,
178+
message = "Use completeExceptionally(cause) on CompletableDeferred/Job or Job.cancel() without exception instead",
176179
replaceWith = ReplaceWith("cancel()")
177180
)
178181
public fun cancel(cause: Throwable? = null): Boolean

0 commit comments

Comments
 (0)