Better exception message when construction fails.
diff --git a/src/main/java/com/google/dexmaker/stock/ProxyBuilder.java b/src/main/java/com/google/dexmaker/stock/ProxyBuilder.java
index ad702e4..6a5e368 100644
--- a/src/main/java/com/google/dexmaker/stock/ProxyBuilder.java
+++ b/src/main/java/com/google/dexmaker/stock/ProxyBuilder.java
@@ -195,8 +195,8 @@
try {
constructor = proxyClass.getConstructor(constructorArgTypes);
} catch (NoSuchMethodException e) {
- // Thrown when the constructor to be called does not exist.
- throw new IllegalArgumentException("could not find matching constructor", e);
+ throw new IllegalArgumentException("No constructor for " + proxyClass.getName()
+ + " with parameter types " + Arrays.toString(constructorArgTypes));
}
T result;
try {