I started to learn Kotlin and I can't understand how to handle exceptions. I know there's no checked ones, but anyway, what should I do if my method throws one? For example:
fun test(a: Int, b: Int) : Int {
return a / b
}
如果我除以零,我将得到ArithmeticException.那么我该怎么处理这样的事情呢?