In AbstractNodeContainerModificationStrategy, added the parent id to the
error messages to provide more context for troubleshooting.
Change-Id: I87fe94b8eab35f50de022db3406b14e667ad691e
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
childOp.get().verifyStructure(castedChild, verifyChildren);
} else {
throw new SchemaValidationFailedException(String.format(
childOp.get().verifyStructure(castedChild, verifyChildren);
} else {
throw new SchemaValidationFailedException(String.format(
- "Child %s is not valid child according to schema.", castedChild.getIdentifier()));
+ "Node %s is not a valid child of %s according to the schema.",
+ castedChild.getIdentifier(), container.getIdentifier()));
protected void recursivelyVerifyStructure(NormalizedNode<?, ?> value) {
final NormalizedNodeContainer container = (NormalizedNodeContainer) value;
for (final Object child : container.getValue()) {
protected void recursivelyVerifyStructure(NormalizedNode<?, ?> value) {
final NormalizedNodeContainer container = (NormalizedNodeContainer) value;
for (final Object child : container.getValue()) {
childOp.get().recursivelyVerifyStructure(castedChild);
} else {
throw new SchemaValidationFailedException(
childOp.get().recursivelyVerifyStructure(castedChild);
} else {
throw new SchemaValidationFailedException(
- String.format("Child %s is not valid child according to schema.", castedChild.getIdentifier()));
+ String.format("Node %s is not a valid child of %s according to the schema.",
+ castedChild.getIdentifier(), container.getIdentifier()));