News From The Evolution Front
An anonymous reader writes "Sun's Java System Calendar Server connector (Hydrogen) for Evolution 1.4 on Solaris and Linux was GPL'ed today and is now available in GNOME CVS. This follows the recent GPLization of Novell's Ximian Connector (for Microsoft Exchange servers). In related news, the next major version of Evolution (version 2.0) is supposed to be released sometime during the next month, and beta testing have picked up pace. If you have some spare time, you can also give the Evolution 1.5.9 a spin. You can also use jhbuild to build Evolution from CVS (since the binaries are quite old by now). There is also a new project in GNOME CVS, called Evolution Brainread which adds a blog viewer to Evolution. It is not yet quite ready for production use, but looks quite good."
Nat remarked in a recent interview that Evo 2 would depend on Mono. Did I understand correctly?
In almost all cases, maybe 95%, there is a real reason to catch a checked exception. Not catching the exception is an error, and should be flagged as such by the compiler.
For example, in C after calling certain functions (IO functions for example) you must check the return code for errors and act on it. Too often have I seen people only checking the return code from the open() but not from the subequent read() for example. Having these methods throw a checked IOException is a very good things, because it makes you deal with the error.
Just because handing errors is freaking boring doesn't mean you don't have to.
Also, there are RuntimeExceptions which doesn't need to be caught.
There is a very simple rule of thumb that should be used when deciding wether to use a checked exception or a RuntimeException: If the potential exception can be thrown from a perfectly bug-free program, then it should be checked. For example: A perfectly correct program without a single bug can still receieve an IOException when reading from a file, because its out of the applications control. Obviously this must be a checked exception.
On the other hand, a NullPointerException is unchecked because it is possible to write the code in such a way that you are guaranteed that they are never thrown.
Now, this rule does not always work perfectly and at times like that it can be a bit painful. For example, InputStream.read() is declared to throw IOException. However, this means that you need to deal with IOException even when reading from a ByteArrayInputStream. These cases doesn't come up that often (if it does to you, you really should think about the quality of the code you are writing) and in the case when it does, it can be wrapped in a simple:
Another annoying quirk is why Integer.parseInt() is declared to throw an unchecked NumberFormatException while NumberFormat.parse() is declared to throw the checked ParseException?