Files
kotlin-fork/backend.native/tests/runtime/exceptions/catch7.kt
T
2017-10-20 18:25:05 +03:00

18 lines
289 B
Kotlin

package runtime.exceptions.catch7
import kotlin.test.*
@Test fun runTest() {
try {
foo()
} catch (e: Throwable) {
val message = e.message
if (message != null) {
println(message)
}
}
}
fun foo() {
throw Error("Error happens")
}