BUG 2970 : Throw a specific exception when schema validation fails 82/21882/2
authorMoiz Raja <moraja@cisco.com>
Sat, 23 May 2015 00:46:00 +0000 (17:46 -0700)
committerGerrit Code Review <gerrit@opendaylight.org>
Thu, 4 Jun 2015 17:44:08 +0000 (17:44 +0000)
commit0c8c2e4c941dbb2a855e75ad20f5ea8310f6e2aa
tree81df9a48339475adbb4643a11b3c75e83a63da67
parent0686c2d01f18a44f65811dc3fffce0ade2e8cd4e
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]