On Wed, Jan 14, 2009 at 8:29 PM, Max Rydahl Andersen
<max.andersen(a)redhat.com> wrote:
Does it hurt to have self explanatory exception names for exceptions
?
No, but that is up to the implementation. It can throw a subclass of
DefinitionException, that is permitted by the spec.
It also helps when a tool sees a stacktrace to provide
"hyperlinking" to the
relevant docs or
even the class mentioned in there - there could even be automatic quickfixes
made based on
these (i.e. "Create method foo on class X" when NonexistentMethodException)
Again, this still works if the subclass is vendor-specific.
I know the reason you want them out of the spec is to avoid having to
define
when each exception is thrown,
No, the real reason is that there is a corner case when processing the
XML format where we're not sure if its a method or a field that is
missing ;-)
--
Gavin King
gavin.king(a)gmail.com
http://in.relation.to/Bloggers/Gavin
http://hibernate.org
http://seamframework.org