TEST: throw keyword support.
This commit is contained in:
committed by
KonstantinAnisimov
parent
0cd4512dd5
commit
81811e8c3a
@@ -0,0 +1,8 @@
|
||||
fun main(args : Array<String>) {
|
||||
val cond = 1
|
||||
if (cond == 2) throw RuntimeException()
|
||||
if (cond == 3) throw NoSuchElementException("no such element")
|
||||
if (cond == 4) throw Error("error happens")
|
||||
|
||||
println("Done")
|
||||
}
|
||||
Reference in New Issue
Block a user