摘要: 捕获异常 Kotlin协程中执行的代码如果可能发生异常,最简单直接的办法也是可以通过 try-catch 语句来捕获异常 GlobalScope.launch { try { println(1 / 0) } catch (e: Exception) { //can catch exception 阅读全文
posted @ 2023-10-10 19:55 jqc 阅读(75) 评论(0) 推荐(0) 编辑