How does Scala compare with other scripting languages on the JVM as regards Exception Handling?
posted 6 years ago
In some forums, I've read that <insert your JVM language of choice that is not Java here> does away with the ugliness of Java Exception Handling.
Does Scala have a easy to use and elegant method of exception handling?
do you really mean exception handling in general? You still have to or better say should handle exceptional conditions in your applications. But I guess you're talking about the annoying boilerplate code to handle exceptions in Java when you have to deal with I/O resources for example. The usual try-catch-finally all over your code just to read a line of text from a file ;-)
This can be handled far less verbose and more elegant with closures for example. Because Scala comes with support for closures as most other languages on the JVM it can help to simplify exception handling a lot. Not sure if this is what you read but at least it is part of the solution regarding the "ugliness" of exception handling.