Bug 3067: Improved error reporting in Binding Data Codec
Error reporting in Binding Data Codec was reworked
to throw three additional subclasses of IllegalArgumentException
for specific case of failure:
MissingSchema and MissingSchemaForClass - exception thrown
when schema context associated with codec does not contain
models for supplied class or DOM argument.
IncorrectNesting is thrown when schema is available an user
constructed data with invalid nesting (bypassed generic
compile-time checks).
The checks to determine type of exception are done only
if error condition is detected, so non-error fast path
should not be affected by advanced checks.
Added test which tests these types of exceptions.
Change-Id: Iad020a42317ab46df4d2240568fd6e8205383857
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
(cherry picked from commit
3f754cccb393b989bafb8b194edf9da0ec3e9e8a)