[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Declaring RuntimeExceptions?
From: |
David Holmes |
Subject: |
RE: Declaring RuntimeExceptions? |
Date: |
Fri, 12 Sep 2003 09:01:41 +1000 |
Standard practice - as epoused by various books and articles from
various source related to Sun - is to not declare RuntimeExceptions on
a throws clause. Such exceptions should be documented in the javadoc
only.
However, the reflection issue is not something I was aware of. If
indeed reflection returns all declared throwables whether runtime
exceptions or not, then there will be a behavioural difference -
though not one that anybody should ever be relying upon.
This situation is also clouded by the default rules for inheriting
@throws documentation comments, which will only inherit comments for
exceptions that are listed in the throws clause. The way around this
is to not declare the exception but instead to the use @inheritDoc to
force the inheritance of the doc comment eg:
@throws someRuntimeException address@hidden
but some people may start declaring the runtime exceptions just to
inherit the doc comments.
David Holmes
- Declaring RuntimeExceptions?, Sascha Brawer, 2003/09/11
- Re: Declaring RuntimeExceptions?, Brian Jones, 2003/09/11
- Re: Declaring RuntimeExceptions?, Ingo Prötel, 2003/09/11
- Re: Declaring RuntimeExceptions?, Otavio Pereira, 2003/09/11
- RE: Declaring RuntimeExceptions?,
David Holmes <=
- Re: Declaring RuntimeExceptions?, Eric Blake, 2003/09/11
- Re: Declaring RuntimeExceptions?, Sascha Brawer, 2003/09/11
- Re: Declaring RuntimeExceptions?, Stephen Crawley, 2003/09/11
- RE: Declaring RuntimeExceptions?, David Holmes, 2003/09/11
- Re: Declaring RuntimeExceptions?, Tom Tromey, 2003/09/17
Re: Declaring RuntimeExceptions?, Tom Tromey, 2003/09/11