It is not immediately clear in what context the search is being
made -- make sure we report parent path, too.
Change-Id: I86a15b409c6241d93f24ee75cc68ff78fc067ebc
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
0c28880fd3df1ba253161b6b75f63f2d7a6e7c02)
if (childDataSchemaNodes.isEmpty()) {
Preconditions.checkState(!strictParsing,
- "Schema for node with name %s and namespace %s doesn't exist.", xmlElementName,
- xmlElementNamespace);
+ "Schema for node with name %s and namespace %s doesn't exist at %s", xmlElementName,
+ xmlElementNamespace, parentSchema.getPath());
skipUnknownNode(in);
continue;
}
fail("IllegalStateException should have been thrown because of an unknown child node.");
} catch (IllegalStateException ex) {
assertTrue(ex.getMessage().contains("Schema for node with name unknown-container-a and namespace "
- + "foo doesn't exist."));
+ + "foo doesn't exist at "));
}
}
}
fail("IllegalStateException should have been thrown because of an unknown child node.");
} catch (IllegalStateException ex) {
assertTrue(ex.getMessage().contains("Schema for node with name my-container-1 and namespace baz-namespace"
- + " doesn't exist."));
+ + " doesn't exist at "));
}
}