if (isPost()) {
final Deque<Object> foundSchemaNodes = findPathToSchemaNodeByName(schemaNode, docRootElm);
+ if (foundSchemaNodes.isEmpty()) {
+ throw new IllegalStateException(String.format("Child \"%s\" was not found in parent schema node \"%s\"",
+ docRootElm, schemaNode.getQName()));
+ }
while (!foundSchemaNodes.isEmpty()) {
final Object child = foundSchemaNodes.pop();
if (child instanceof AugmentationSchema) {