Skip to content

Commit a51060e

Browse files
committed
Improved exception message for missing enum constants
1 parent cd2c52e commit a51060e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/javawebstack/abstractdata/mapper/DefaultMappers.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ public Object fromAbstract(MapperContext context, AbstractElement element, Class
378378
try {
379379
return Enum.valueOf(type, element.string());
380380
} catch (IllegalArgumentException ex) {
381-
throw new MapperException("There is no enum constant '" + element.string() + "'");
381+
throw new MapperException("There is no enum constant '" + element.string() + "' in '" + type.getName() + "'");
382382
}
383383
}
384384
if(type.equals(UUID.class))

0 commit comments

Comments
 (0)