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

Wrong line number on PropertyMissingException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.5.7, 1.6-beta-2, 1.6-rc-1, 1.7-beta-1
    • 1.6-rc-1, 1.5.8, 1.7-beta-1
    • None
    • None

    Description

      The following script:

      println "hello world" // line 1
      // line 2
      Pffff // line 3

      Will generate the following exception (when launched in the Swing console):

      Exception thrown: groovy.lang.MissingPropertyException: No such property: Pffff for class: ConsoleScript7
      groovy.lang.MissingPropertyException: No such property: Pffff for class: ConsoleScript7
      at ConsoleScript7.run(ConsoleScript7:1)

      You'll notice the error appears one line 1 instead of line 3

      Attachments

        Activity

          People

            blackdrag Jochen Theodorou
            guillaume Guillaume Sauthier
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: