scala:异常处理(try/catch)

处理语法:

try {
    // ...
} catch {
    case ex: Exception => {
        ex.printStackTrace() // 打印到标准err
        System.err.println("exception===>: ...")  // 打印到标准err
    }
}
posted @ 2018-12-29 09:04  xuejianbest  阅读(2127)  评论(0编辑  收藏  举报