Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- scala> def x(f: => Any) = try { f } catch { case _ => println("YES") }
- x: (f: => Any)Any
- scala> x { throw new Exception }
- YES
- res3: Any = ()
- scala> x { actor { throw new Exception} }
- res4: Any = scala.actors.Actor$$anon$1@1aaf194
- scala> scala.actors.Actor$$anon$1@1aaf194: caught java.lang.Exception
- java.lang.Exception
- .
- .
- .
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement