diff --git a/gson/src/main/java/com/google/gson/internal/ConstructorConstructor.java b/gson/src/main/java/com/google/gson/internal/ConstructorConstructor.java index ef7ae630..971a0b8b 100644 --- a/gson/src/main/java/com/google/gson/internal/ConstructorConstructor.java +++ b/gson/src/main/java/com/google/gson/internal/ConstructorConstructor.java @@ -91,11 +91,12 @@ public final class ConstructorConstructor { return (T) constructor.newInstance(args); } catch (InstantiationException e) { // TODO: JsonParseException ? - throw new RuntimeException(e); + throw new RuntimeException("Failed to invoke " + constructor + " with no args", e); } catch (InvocationTargetException e) { // TODO: don't wrap if cause is unchecked! // TODO: JsonParseException ? - throw new RuntimeException(e.getTargetException()); + throw new RuntimeException("Failed to invoke " + constructor + " with no args", + e.getTargetException()); } catch (IllegalAccessException e) { throw new AssertionError(e); }