When to catch exceptions
Under this title is a very well written, easy-to-understand article about
working with exceptions in Java.
Dave Schweisguth asks which type of
exception to throw, but above all explains why it’s important always to throw the specific exception type instead of its superclass.
The author points out the misuse of exceptions such as jaav.lang.Error and
java.lang.RuntimeException, which many programmers use as crutches
instead of specifying a particular error type. Worse still, programmers
even throw these exceptions deliberately, although they’re very difficult to handle and manage.
Related articles
Related CZ Podcast episodes
- #3 · Java 6 SE, Vývoj webových aplikací
Dagi and Filemon discuss Java 6 and web application frameworks. · Czech audio
- #1 · Vývojová prostředí v Javě
The first CZ Podcast episode looks at Java development environments. · Czech audio