History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: GROOVY-1527
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Unassigned
Reporter: Russel Winder
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
groovy

Incorrect behaviour of a parse error.

Created: 12/Oct/06 02:32 AM   Updated: 04/Jan/08 10:38 AM
Component/s: None
Affects Version/s: None
Fix Version/s: 1.5.2

Time Tracking:
Not Specified

Environment: Ubuntu 6.06 LTS "Dapper Drake" + JDK 1.5.0_06 + Groovy r4101


 Description  « Hide
The script:
final groovyHome = System.getenv ( 'GROOVY_HOME' ) ; { assert groovyHome != '' }

gives a reasonable error message. However, the script:

( new GroovyShell ( ) ).evaluate ("final groovyHome = System.getenv ( 'GROOVY_HOME' ) ; { assert groovyHome != '' }")

gives the almost incomprehensible:

Caught: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed,
at parseError.run(parseError.groovy:1)
at parseError.main(parseError.groovy)



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Russel Winder - 15/Jul/07 04:13 AM
A similar error message is now generated in both cases so in that respect things are fixed. However, is the error message:

org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed, ./GROOVY_1527.groovy: 3: Closure expression looks like it may be an isolated open block.;
solution: Add an explicit parameter list, as in {it -> ...}, or label it as L:{...}. @ line 3, column 54.
em.getenv ( 'GROOVY_HOME' ) ; { assert g
^

for the first script actually reasonable?


Andres Almiray - 27/Nov/07 01:31 PM
Both scripts now yield the same error message, can this be closed then?

Paul King - 30/Dec/07 03:39 PM
Closing - there is already an open issue related to improving such an error message: GROOVY-1742