Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-4703

Improve FactoryBuilderSupport exception messages

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 1.8-rc-2, 1.9-beta-1
    • None
    • None
    • Patch

    Description

      FactoryBuilderSupport exception messages could be improved in checkValueIsType() and checkValueIsTypeNotString().

      Today the messages read: "The value of argument 'foo' must be of type Bar."
      This doesn't tell the user what the input was that caused the failure.
      A better message is: "The value of argument 'foo' must be of type Bar. Found: Baz"

      This is an easy change to make, and cannot cause a NPE or anything like that.

      Attachments

        Activity

          People

            hamletdrc Hamlet D'Arcy
            hamletdrc Hamlet D'Arcy
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 0.5h
                0.5h
                Remaining:
                Remaining Estimate - 0.5h
                0.5h
                Logged:
                Time Spent - Not Specified
                Not Specified