-
Enhancement
-
Resolution: Duplicate
-
P3
-
None
-
6
-
None
-
generic
-
generic
There are many reflection related exceptions, such as ClassNotFoundException, InstantiationException,IllegalAccessException,InvocationTargetException, NoSuchFieldException, and NoSuchMethodException, but they do not share any common exception type other than Exception, so people are forced to write "catch(Exception)", which has undesirable side-effect of catching RuntimeException.
It would be really nice to introduce ReflectionException as the common base exception for all reflection-related exceptions to mitigate this pain. This is analogous to how IOException has a lot of sub-types.
See http://weblogs.java.net/blog/kohsuke/archive/2006/10/closures_and_la.html for a related rant and how people reacted to this.
It would be really nice to introduce ReflectionException as the common base exception for all reflection-related exceptions to mitigate this pain. This is analogous to how IOException has a lot of sub-types.
See http://weblogs.java.net/blog/kohsuke/archive/2006/10/closures_and_la.html for a related rant and how people reacted to this.
- duplicates
-
JDK-6368013 (reflect) RFE: create a common superclass for reflection exceptions
- Closed