异常处理

This commit is contained in:
luming 2021-06-30 14:55:33 +08:00
parent 43aef6e155
commit e78b3c5862

View File

@ -12,5 +12,7 @@ fun main(args: Array<String>) {
devide(5, 0) devide(5, 0)
} catch (e: ArithmeticException) { } catch (e: ArithmeticException) {
println("error:" + e.message) println("error:" + e.message)
} finally {
println("finally代码块")
} }
} }