Code review request for 6857789: (reflect) Create common superclass of reflective exceptions
forax at univ-mlv.fr
Fri Jul 10 15:48:25 UTC 2009
Jason Mehrens a écrit :
> Wouldn't LinkageException be a better fit than
> ReflectiveOperationException? Shorter name and it would mimic the
> LinkageError inheritance tree introduced in JDK1.0. I.E. LinkageError
> -> NoClassDefFoundError, LinkageException -> ClassNotFoundException
> > This request seems dangerous,
> > InvocationTargetException should not be retrofitted because
> > usually its catch block is different from the others.
> > John Rose recently proposes on coin-dev list a method that can be
> > in the JDK, see
> > http://mail.openjdk.java.net/pipermail/coin-dev/2009-June/001954.html
> > to simplify catch blocks that catch an InvocationTargetException.
> I would think throwing UndeclaredThrowableException would be better
> than InternalError.
You're right, UndeclaredThrowableException is better.
More information about the core-libs-dev