From 05b17f92714ac8ad716bb379eea13a2b4ed4ce4e Mon Sep 17 00:00:00 2001 From: Inderjeet Singh Date: Mon, 16 Nov 2015 09:12:23 -0800 Subject: [PATCH] Adding details in the throw exception on a missing field. --- .../main/java/com/google/gson/internal/bind/TypeAdapters.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gson/src/main/java/com/google/gson/internal/bind/TypeAdapters.java b/gson/src/main/java/com/google/gson/internal/bind/TypeAdapters.java index d284dd5b..c72c0d9a 100644 --- a/gson/src/main/java/com/google/gson/internal/bind/TypeAdapters.java +++ b/gson/src/main/java/com/google/gson/internal/bind/TypeAdapters.java @@ -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 {