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

Improve error message when a matching constructor cannot be found at runtime

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.0-beta-4
    • 1.0-beta-5
    • None
    • None
    • All

    Description

      When attempting to create an object with a constructor signature that does not exist, a runtime error can be produced which only shows the class name. It should also show the constructor argument types. See MetaClass.invokeConstructor().
      Example:
      Current error message:
      Could not find matching constructor for class: myClass
      New error message:
      Could not find matching constructor for: myClass(java.lang.String)

      Attachments

        Issue Links

          Activity

            People

              bl7385 Brian Larson
              bl7385 Brian Larson
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: