Exception handling using enumerations in Java (II)

In the first part of this blog post I discussed how Java Enumerations can be conveniently used as 1. Fault codes in exceptions; and 2. Provide formatted and localized error messages The major drawback with the approach is that the fault codes make exception handling more complicated for cases when…

Exception handling using enumerations in Java (I)

When I first read about Swift I quite liked its error handling. In Java checked exceptions have gotten quite a bad rep but instead of throwing out the baby with the bathwater and getting rid of checked exceptions altogether, the way they do it in Swift seems to strike a…