Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.0-RC-1
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Environment:WinXP, jre1.5.0_07, groovy-1.0-JSR-06
Description
In RC1, when calling a nested GroovyShell to run() or evaluate() a script with an error, the MultipleCompilationErrorsException thrown doesn't give the extra info such as line number. It did in JSR-06.
Eg, for File1.groovy:
new GroovyShell().run( new File('File2.groovy') )
and File2.groovy:
oink, oink //syntax error
Running RC1's groovy.ui.GroovyMain on File1.groovy gives error message:
Caught: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed,
at File1.run(File1.groovy:1)
at File1.main(File1.groovy)
but running JSR6's GroovyMain on it gives:
Caught: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed,
File2.groovy: 1: unexpected token: , @ line 1, column 5.
oink, oink
^
1 error
at File1.run(File1.groovy:1)
at File1.main(File1.groovy)
The same situation occurs if we evaluate() instead of run() File2.groovy.
I've given this priority "Major" because, unlike other Jira issues I've reported, this one stops me debugging easily with RC1 when I could with JSR-06.
Thanks, Gavin Grover
for environment, I meant to write:
WinXP, jre1.5.0_07, groovy-1.0-RC-01