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

Improve error messages on failed compilation

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.0-JSR-5
    • 1.0
    • parser-antlr2
    • None

    Description

      Some failed compilations yield ugly error messages:

      org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed, CommandLine.groovy: 2: Unexpected node type: DYNAMIC_MEMBER found when expecting type: an identifier at line: 2 column: 6. File: CommandLine.groovy @ line 2, column 6.
      1 Error

      The line information is written 3 times, the cryptic "startup failed" doesn't really mean anything useful.
      Instead, we should print a friendlier message like:

      Compilation failed: CommandLine.groovy: Unexpected node type: DYNAMIC_MEMBER found when expecting type: an identifier
      File: CommandLine.groovy @ line 2, column 6.
      1 error

      Attachments

        Activity

          People

            Unassigned Unassigned
            guillaume Guillaume Sauthier
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: