[Minor] Better exception logging in FromFlatJsonVisitor

This commit is contained in:
Robert von Burg 2018-05-22 19:35:49 +02:00
parent 0f8c2c7262
commit 4e7b2dde0e
1 changed files with 4 additions and 2 deletions

View File

@ -142,13 +142,15 @@ public class FromFlatJsonVisitor implements StrolchRootElementVisitor<Void> {
if (jsonElement == null) {
if (this.optionalKeys.containsElement(bagId, paramId))
continue;
throw new StrolchModelException("JsonObject is missing member " + paramId);
throw new StrolchModelException(
"JsonObject is missing member " + paramId + " for " + parameterBag.getLocator() + "/"
+ paramId);
}
if (!jsonElement.isJsonPrimitive()) {
throw new StrolchModelException(
"JsonElement " + paramId + " is not a json primitive but a " + jsonElement.getClass()
.getName());
.getName() + " for " + parameterBag.getLocator() + "/" + paramId);
}
Parameter<?> parameter = parameterBag.getParameter(paramId);