Skip to content

Commit

Permalink
fix: Change error message when a field is not found
Browse files Browse the repository at this point in the history
  • Loading branch information
Idane committed Jul 10, 2022
1 parent efa1f31 commit 9bb080b
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -53,7 +53,7 @@ class ShapeShiftAnnotationMappingResolver : MappingResolver {
fun resolveNodesToFields(nodes: List<String>, field: Field?, clazz: Class<*>): List<Field> {
if (field == null) {
if (nodes.isEmpty()) {
error("Field not specified and no field reference found")
error("Unable to determine mapped field for $clazz")
}
val realField = clazz.getDeclaredFieldRecursive(nodes.first())
return resolveNodesToFields(nodes.drop(1), realField, realField.type)
Expand Down

0 comments on commit 9bb080b

Please sign in to comment.