fun throwIfTrue(param: Boolean) { try { if (param) { throw Exception("test exception") } } catch (e: Exception) { println("catch") } finally { println("finally") }}throwIfTrue(true)//输出 "catch" 和 "finally"throwIfTrue(false)//只输出 "finally"