BUG 2970 : Throw a specific exception when schema validation fails 18/21018/4
authorMoiz Raja <moraja@cisco.com>
Sat, 23 May 2015 00:46:00 +0000 (17:46 -0700)
committerGerrit Code Review <gerrit@opendaylight.org>
Thu, 28 May 2015 07:20:39 +0000 (07:20 +0000)
commit95a09595da1e5385047ddd1ce773b784f7671f8e
tree45d6ec5f6965eebcdcfeebe070c6e507697ac8c5
parent2cb012f4e814859e10726d02cb1c073321316ab3
BUG 2970 : Throw a specific exception when schema validation fails

When resolving a modification if there is a failure in validating
a data node because it's schema is not present we should throw
a specific exception instead of just an IllegalArgument exception.

This specific exception can be used by CDS to determine if the failure
to add a node was due to a schema validation failure and then we will
attempt to prune data from the normalized node so that the invalid
data elements are removed.

Change-Id: Ieba347c29a9e92ea6aa7ccc2570935cd7a233b8e
Signed-off-by: Moiz Raja <moraja@cisco.com>
yang/yang-data-impl/src/main/java/org/opendaylight/yangtools/yang/data/impl/schema/tree/InMemoryDataTreeModification.java
yang/yang-data-impl/src/main/java/org/opendaylight/yangtools/yang/data/impl/schema/tree/SchemaValidationFailedException.java [new file with mode: 0644]