Discussion:
[groovy-dev] Help with groovy.lang.Script
z***@gmail.com
10 years ago
Permalink
Hi,

I am helping my company to upgrade our groovy library from 2.0.5. I have
found some interesting problem with groovy.lang.Script.

Currently we have a customized Groovy script base class, declared as

public abstract class OurDelegatingScript implements
groovy.lang.GroovyObject {
....
public abstract Object run() throws SrciptException;
}

With the latest version of Groovy it causes a runtime exception:

Declared type MyScript does not extend groovy.lang.Script class!


I can try to set the base to be a subclass of groovy.lang.Script but then
it does not compile because the base class in groovy.lang.Script does not
throw checked exception.

What is the best way to get it fixed? I imagine that this issue must have
occurred when groovy.lang.Script was introduced.

Thanks,

Zhi

Continue reading on narkive:
Loading...