blob: e174f45e6d0a098497007b086a4824e53cd378d1 [file]
// WITH_STDLIB
import kotlin.test.*
val sb = StringBuilder()
fun box(): String {
try {
sb.appendLine("Before")
throw Error("Error happens")
sb.appendLine("After")
} catch (e: Throwable) {
sb.appendLine("Caught Throwable")
}
sb.appendLine("Done")
assertEquals("""
Before
Caught Throwable
Done
""".trimIndent(), sb.toString())
return "OK"
}