Commit 9e6d20a2 authored by Jonas Waeber's avatar Jonas Waeber
Browse files

Improve error reporting for mapping

parent c0976642
......@@ -178,7 +178,7 @@ class MappingConfig(directory: String) {
}
KEYS.creators ->
recordFieldMappers.addAll(buildCreatorMapper(entry.value))
else -> throw InvalidMappingException("Unknown top level key $key in mapping.")
else -> throw InvalidMappingException("Unknown key '$key' in record mapping.")
}
}
}
......@@ -194,7 +194,7 @@ class MappingConfig(directory: String) {
physicalObjectFieldMappers.addAll(buildIdentifierMapper(entry.value))
KEYS.rights ->
physicalObjectFieldMappers.addAll(buildRuleMappers(entry.value))
else -> throw InvalidMappingException("Unknown top level key $key in mapping.")
else -> throw InvalidMappingException("Unknown key '$key' in physical object mapping.")
}
}
}
......@@ -206,7 +206,7 @@ class MappingConfig(directory: String) {
digitalObjectFieldMappers.add(buildSimpleMappers(entry))
KEYS.rights ->
digitalObjectFieldMappers.addAll(buildRuleMappers(entry.value))
else -> throw InvalidMappingException("Unknown top level key $key in mapping.")
else -> throw InvalidMappingException("Unknown key '$key' in digital object mapping.")
}
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment