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

Bad error message for pattern constraint

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Resolution: Done
    • None
    • None
    • None
    • None
    • Operating System: All
      Platform: All

    • 7551
    • Low

    Description

      The error message that the YANG parser associates with a pattern (in PatternConstraintImpl) is:

      this.errorMessage = errorMessage != null ? errorMessage : String.format(
      "String %s is not valid regular expression.", regex);

      This is a misleading error message: it is not the regular expression that is invalid, but the given value: that value does not match the regular expression, and so the value is invalid.

      This error message should be corrected.

      Attachments

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

        Activity

          People

            pkajsa Peter Kajsa
            verthezpw Peter Verthez
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: