import java.io.{FileNotFoundException, FileReader, IOException}
/**
* Created by vincentliu on 7/18/2017.
*/
object ex {
def main(args: Array[String]): Unit = {
try{
val f = new FileReader("input.txt")
} catch{
case ex: FileNotFoundException => {
println("Missing file exception")
}
case ex: IOException => {
println("IO Exception")
}
} finally {
println("exit....")
}
}
}
Scala——异常
最新推荐文章于 2024-05-02 12:44:48 发布