Files
kotlin-fork/backend.native/tests/codegen/try/finally3.kt
T
Svyatoslav Scherbina e2dbeae85e backend: add tests for try-catch-finally and throwing exceptions
also add some tests for bugs with unreachable code handling and variables
2016-11-28 20:24:27 +07:00

19 lines
345 B
Kotlin

fun main(args : Array<String>) {
try {
try {
println("Try")
throw Error("Error happens")
println("After throw")
} finally {
println("Finally")
}
println("After nested try")
} catch (e: Error) {
println("Caught Error")
}
println("Done")
}