1 package kotlinx.coroutines 2 3 /** 4 * This exception gets thrown if an exception is caught while processing [CompletionHandler] invocation for [Job]. 5 * 6 * @suppress **This an internal API and should not be used from general code.** 7 */ 8 @InternalCoroutinesApi 9 public class CompletionHandlerException(message: String, cause: Throwable) : RuntimeException(message, cause) 10 11 public expect open class CancellationException(message: String?) : IllegalStateException 12 CancellationExceptionnull13public expect fun CancellationException(message: String?, cause: Throwable?) : CancellationException 14 15 internal expect class JobCancellationException( 16 message: String, 17 cause: Throwable?, 18 job: Job 19 ) : CancellationException { 20 internal val job: Job 21 } 22 23 internal class CoroutinesInternalError(message: String, cause: Throwable) : Error(message, cause) 24 25 // For use in tests 26 internal expect val RECOVER_STACK_TRACES: Boolean 27