Uploaded image for project: 'yangtools'
  1. yangtools
  2. YANGTOOLS-763

yang-data-codecs: improve validation error reporting

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Done
    • 5.0.0
    • None
    • None
    • None
    • Operating System: All
      Platform: All

      Our current codecs throw a generic IllegalArgumentException when data passes parsing but fails validation (such as pattern, length or range constraints). This results in loss of information in schema, as these constraints can carry additional information.

      Introduce a specialized subclass of IllegalArgumentException which will contain:

      • string value being parsed
      • ConstraintMetaDefinition which was violated

      Once defined, make all codec instances throw this exception instead of IAE when validation fails.

            TadeyBilan Tadey Bilan
            rovarga Robert Varga
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: