This page is no longer maintained — Please continue to the home page at www.scala-lang.org

Why are there no "throws" annotations on methods, unlike in Java?

Compile-time checking of exceptions sounds good in theory, but in practice has not worked well. Programmers tend to write catch clauses that catch too many exceptions, thus swallowing exceptions and decreasing reliability.

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland