Sure - if you look at the exception that flows through -
java.lang.reflect.InvocationTargetException - that tells you the call
was made via reflection. Any exceptions thrown in reflection calls get
wrapped by the reflection API in InvocationTargetExceptions.
Your options are:
- put a type hint on *value-factory* so the call becomes non-
reflective.
- change your expectations :)
There are lots of situations where exceptions can get wrapped -
reflection, threading APIs, etc. I'm not sure of the viability of
catching exceptions by type, vs catching base exceptions and examining
the cause (using getCause).
Rich