[jdom-interest] Re: Exception documentation

Alex Rosen arosen at silverstream.com
Tue Apr 30 09:04:12 PDT 2002

>How to Write Doc Comments goes so far as to say:
>"It is considered poor programming practice to include unchecked exceptions
>in the throws clause."
>I've never read a good explanation why not, but this guideline suits me
>fine.  It places a clear guideline on the method signature while leaving
>room for editorializing in the javadoc.

I have a vague memory of some old Java compilers that had a problem with
this. If you called a method, it forced you to catch *every* exception
listed in the method's throws clause, even unchecked exceptions. In other
words putting it in the throws clause would basically turn it from an
unchecked exception into a checked exception. Maybe that's where this comes


More information about the jdom-interest mailing list