The current SVN Head code handles exceptions differently than groovy 1.5.4 or earlier. This change in the behavior is a breaking change for some existing code:
Example Code from the groovy-eclipse project: org.codehaus.groovy.eclipse.astviews, TreeNodeFactory.groovy, Class DefaultTreeNode#loadChildren:
try {
return TreeNodeFactory.createTreeNode(this, value."${method.name}"(), name)
} catch (org.codehaus.groovy.GroovyBugError e) {
// Some getters are not for us.
return null
} catch (NullPointerException e) {
// For some reason ClassNode.getAbstractMethods() has a problem - ClassNode.superclass is null.
return null
}
This used to work with groovy 1.5.4: after the call of createTreeNode method the groovy core class "ClassNode" sometime threw a GroovyBugError and it was possible to catch this exception.
After changing to 1.6 the exception that is thrown is not a GroovyBugError anymore, it is a InvokerInvocationException that wraps (cause field) around the GroovyBugError and therefore doesen't get caught anymore.
sorry...code looks nicer like this