ProviderFactory.createProviderFromConstructor should include exception cause
If newInstance fails because the called constructor of a custom Application implementation throws an exception, the root cause is not included which would reduce the search time for the actual cause.
@@ -1183,7 +1183,7 @@ public abstract class ProviderFactory {
instance = c.newInstance(cArgs);
} catch (Throwable ex) {
throw new RuntimeException("Resource or provider class " + c.getDeclaringClass().getName()
- + " can not be instantiated");
+ + " can not be instantiated", ex);
}
Map<Class<?>, ThreadLocalProxy<?>> proxies =
new LinkedHashMap<Class<?>, ThreadLocalProxy<?>>();
