Uploaded image for project: 'DMR'
  1. DMR
  2. DMR-11

More useful conversion failure messages

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • None
    • None

      The various ModelValue conversion methods throw a simple new IllegalArgumentException() when the conversion is invalid for the type. These should include a useful message explaining the value's type, what the attempted conversion was, and if possible some recommendation on what the value's type should be in order to support the conversion.

      For example

      "Cannot convert a node of type STRING to a property list. Recommended node type is

      {OBJECT}

      ".

      The {} around OBJECT is a possible further nice-to-have – a bit of hint about the needed syntax for folks creating nodes from parsed text (e.g. WildFly CLI users).

      For LIST it would be [LIST]

              bstansbe@redhat.com Brian Stansberry
              bstansbe@redhat.com Brian Stansberry
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: