Make the struct "not a subclass of Struct" error message clearer.
Test: treehugger
Change-Id: Ia281e186db258af3629c10b260971201380f33f4
diff --git a/staticlibs/device/com/android/net/module/util/Struct.java b/staticlibs/device/com/android/net/module/util/Struct.java
index ac9dc54..d717bc7 100644
--- a/staticlibs/device/com/android/net/module/util/Struct.java
+++ b/staticlibs/device/com/android/net/module/util/Struct.java
@@ -518,7 +518,8 @@
private static FieldInfo[] getClassFieldInfo(final Class clazz) {
if (!isStructSubclass(clazz)) {
throw new IllegalArgumentException(clazz.getName() + " is not a subclass of "
- + Struct.class.getName());
+ + Struct.class.getName() + ", its superclass is "
+ + clazz.getSuperclass().getName());
}
final FieldInfo[] cachedAnnotationFields = sFieldCache.get(clazz);