16 lines
205 B
Plaintext
16 lines
205 B
Plaintext
// OPTION: 1
|
|
fun foo(n: Int): Int {
|
|
try {
|
|
n / 0
|
|
}
|
|
catch (e: ArithmeticException) {
|
|
val m = -1
|
|
m
|
|
}
|
|
catch (e: Exception) {
|
|
-2
|
|
}<caret>
|
|
|
|
return 0
|
|
}
|