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

Incorrect line number reporting

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 4.0.4, 3.0.13, 4.0.6
    • None
    • parser-antlr4
    • None
    • jAlbum skin

    Description

      We often see incorrect line number reports for Groovy scripts. The attached "onload.groovy" script (builds a Swing UI) has a syntax error on line 103: The "new StateMonitor()" instantiation is missing "()". When parsing we however get an error on line 15:

      Unexpected input: '{' @ line 15, column 38.
         ControlPanel ui = new ControlPanel() {

       

      This poor error line detection makes it very hard to debug larger scripts

       

      Attachments

        1. onload.groovy
          8 kB
          David Ekholm

        Activity

          People

            Unassigned Unassigned
            davidekholm David Ekholm
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: