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

yang-data-codecs: improve validation error reporting

    XMLWordPrintable

Details

    • Improvement
    • Status: Resolved
    • Resolution: Done
    • None
    • 5.0.0
    • None
    • None
    • Operating System: All
      Platform: All

    Description

      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.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: