Merge pull request #738 from google/missing_field_details
Added details and causes while throwing AssertionError
This commit is contained in:
commit
5e3d4320cf
@ -62,7 +62,7 @@ public final class Excluder implements TypeAdapterFactory, Cloneable {
|
||||
try {
|
||||
return (Excluder) super.clone();
|
||||
} catch (CloneNotSupportedException e) {
|
||||
throw new AssertionError();
|
||||
throw new AssertionError(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -241,7 +241,7 @@ public final class ReflectiveTypeAdapterFactory implements TypeAdapterFactory {
|
||||
}
|
||||
}
|
||||
} catch (IllegalAccessException e) {
|
||||
throw new AssertionError();
|
||||
throw new AssertionError(e);
|
||||
}
|
||||
out.endObject();
|
||||
}
|
||||
|
@ -796,7 +796,7 @@ public final class TypeAdapters {
|
||||
constantToName.put(constant, name);
|
||||
}
|
||||
} catch (NoSuchFieldException e) {
|
||||
throw new AssertionError();
|
||||
throw new AssertionError("Missing field in " + classOfT.getName(), e);
|
||||
}
|
||||
}
|
||||
@Override public T read(JsonReader in) throws IOException {
|
||||
|
Loading…
Reference in New Issue
Block a user