As I write more Groovy, I find that simple errors come… and my brain does the usual:
It reads what it thinks is there, NOT what is on the screen
One example is:
The misplaced ${ }
As I move things in and out of strings, I sometimes forget to get rid of the ${ } escapes:
name = “Dion”
println ${name}
# should of course be println name
It would be great if you had the error:
“${ } out of escaped string at ‘${name}’ on line 3″
however you get something like:
Caught: groovy.lang.MissingMethodException: No signature of method test.$() is applicable for argument types: (test$_run_closure1) values: [test$_run_closure1@a9c09e]groovy.lang.MissingMethodException: No signature of method test.$() is applicable for argument types: (test$_run_closure1) values: [test$_run_closure1@a9c09e]
NOTE: I know that the Groovy guys haven’t gotten to the “get the debugging stuff working” phase yet… or as James calls it “debug hell” :)
July 13th, 2004 at 3:04 am
Agreed – this should be super-easy to add as a check, since method names shouldn’t start with $ :)
July 13th, 2004 at 10:07 am
Now fixed in CVS HEAD – you’ll get a much better error message now when you make this typo :)
May 25th, 2007 at 3:56 pm
http://www.penis-enlargement-dream.com