Groovy error reporting needs to be improved

I have seen the following problem with the Groovy error handling: When there is an error in a method call, instead of pointing out the actual error, only the line is highlighted from where the method is called.
For example, working with the following code:

input = new Scanner(;

def problematicCode() {
println notValidVariable // this line doesn’t work

N = input.nextInt()
for (i = 0; i < N; ++i) {
telephone =


The error is shown at the last line, while actually it is the 4th line.

Running the same code on my PC I get the following stacktrace:

Exception in thread "main" groovy.lang.MissingPropertyException: No such property: habla for class: PhoneNumbers
	at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(
	at org.codehaus.groovy.runtime.callsite.PogoGetPropertySite.getProperty(
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGroovyObjectGetProperty(
	at PhoneNumbers.problematicCode(PhoneNumbers.groovy:4)

Here, the second line from the bottom shows the proper error.

Would it be possible to check whether this information is available, and fix the editor to jump to the right line?


Bump. I think this should be fixed before the next compo.