Added some additional information to the bad constants exception.
Only of marginal utility but it was a nice sanity check.
This commit is contained in:
parent
a0569b340d
commit
ac5cc5312b
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user