1 /* 2 * Copyright 2016-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. 3 */ 4 5 package kotlinx.coroutines.exceptions 6 7 import kotlinx.coroutines.* 8 9 internal expect open class SuppressSupportingThrowable() : Throwable 10 expect val Throwable.suppressed: Array<Throwable> 11 // Unused on purpose, used manually during debugging sessions printStackTracenull12expect fun Throwable.printStackTrace() 13 14 expect fun randomWait() 15 16 expect fun currentThreadName(): String 17 18 inline fun CloseableCoroutineDispatcher.use(block: (CloseableCoroutineDispatcher) -> Unit) { 19 try { 20 block(this) 21 } finally { 22 close() 23 } 24 } 25