Details
-
Type:
Improvement
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 1.0-JSR-1
-
Fix Version/s: 1.1-beta-2
-
Component/s: None
-
Labels:None
-
Environment:Windows 2000, groovy 1.0 jsr-1, jdk 1.4
-
Number of attachments :
Description
The following program produces an error:
"
class Employee {
String name
int empId
String toString() {
return name + ": " + empId
}
}
e = new Employee()
println e
"
The error is "Cannot invoke method: plus on null object". What I expect to see is "null: 0". I can see why this is happening but I don't know the best way to fix it.
Another issue is that when anything goes wrong in groovy, I get a big stacktrace, java style. As a user of the system, I'd rather just see a concise one line error.
Thanks, keep up the good work. I'm certainly going to keep my eye on this language.
JJ Furman
I don't know when this changed, but in HEAD this now prints:
null: 0