BUG 2970 : Throw a specific exception when schema validation fails
[yangtools.git] / yang / yang-data-impl / src / main / java / org / opendaylight / yangtools / yang / data / impl / schema / tree / InMemoryDataTreeModification.java
index 032bd927a42b4eec10c966b9ce2d49c7fdbfa696..21ccb1962d49f5189d24c90ae6f31a18d32b1648 100644 (file)
@@ -153,7 +153,7 @@ final class InMemoryDataTreeModification implements DataTreeModification {
         for(final PathArgument pathArg : path.getPathArguments()) {
             final Optional<ModificationApplyOperation> potential = operation.getChild(pathArg);
             if (!potential.isPresent()) {
-                throw new IllegalArgumentException(String.format("Child %s is not present in schema tree.",
+                throw new SchemaValidationFailedException(String.format("Child %s is not present in schema tree.",
                         Iterables.toString(Iterables.limit(path.getPathArguments(), i))));
             }
             operation = potential.get();