try 作为表达式throw Exception("exception") try { // 表达式}catch (e: Exception) { // 表达式}finally { // 表达式} try 作为表达式 代码块中最后一个表达式就是结果 val number = try { Integer.parseInt("1") // 当没有异常发生时使用这个值} catch(e: NumberFormatException) { null // 当异常发生时使用这个值}