From ac5cc5312b16b73fa90eb364e4f6205060c261c9 Mon Sep 17 00:00:00 2001 From: Paul Speed Date: Thu, 31 Dec 2015 04:27:05 -0500 Subject: [PATCH] Added some additional information to the bad constants exception. Only of marginal utility but it was a nice sanity check. --- .../jme3/network/serializing/serializers/EnumSerializer.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/jme3-networking/src/main/java/com/jme3/network/serializing/serializers/EnumSerializer.java b/jme3-networking/src/main/java/com/jme3/network/serializing/serializers/EnumSerializer.java index 017544b2a..3b89f7d5a 100644 --- a/jme3-networking/src/main/java/com/jme3/network/serializing/serializers/EnumSerializer.java +++ b/jme3-networking/src/main/java/com/jme3/network/serializing/serializers/EnumSerializer.java @@ -48,8 +48,9 @@ public class EnumSerializer extends Serializer { if (ordinal == -1) return null; T[] enumConstants = c.getEnumConstants(); - if (enumConstants == null) - throw new SerializerException( "Class has no enum constants:" + c ); + if (enumConstants == null) { + throw new SerializerException("Class has no enum constants:" + c + " Ordinal:" + ordinal); + } return enumConstants[ordinal]; } catch (IndexOutOfBoundsException ex) { return null;