Another tour of Scala


Exception Handling

Viewing old version 96de2d0a2127933e5608adbbd68e42d72f40e534; View Current

The Gist

The tour doesn’t deal with exception handling directly.

My Take

In Scala, there are no checked exceptions, but you can still handle them if you like. This is done via the case statement and pattern matching:

My Thoughts on This Feature

Aside from the fact that you don’t even have to handle exceptions explicitly, this syntax for doing so is much simpler and easier to deal with, IMO

Last Updated 12/09/2009 at 10:21:10 AM by davec

blog comments powered by Disqus