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 f86c71249bc53b20f2b3a5586cc16b49302c58cb..3885c0e557434d20563f0796ae6a8a37a5011049 100644 (file)
@@ -151,7 +151,7 @@ final class InMemoryDataTreeModification implements DataTreeModification {
         for (PathArgument pathArg : path.getPathArguments()) {
             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();