1 /*
2  * Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
3  */
4 
5 package kotlinx.coroutines
6 
7 /**
8  * @suppress **This an internal API and should not be used from general code.**
9  */
10 @InternalCoroutinesApi
11 public expect class CompletionHandlerException(message: String, cause: Throwable) : RuntimeException
12 
13 public expect open class CancellationException(message: String?) : IllegalStateException
14 
15 @Suppress("FunctionName")
16 public expect fun CancellationException(message: String?, cause: Throwable?) : CancellationException
17 
18 internal expect class JobCancellationException(
19     message: String,
20     cause: Throwable?,
21     job: Job
22 ) : CancellationException {
23     internal val job: Job
24 }
25 
26 internal class CoroutinesInternalError(message: String, cause: Throwable) : Error(message, cause)
27 
28 internal expect fun Throwable.addSuppressedThrowable(other: Throwable)
29 // For use in tests
30 internal expect val RECOVER_STACK_TRACES: Boolean