Strange groovy behavior when dealing with threads
Posted
by Misha Koshelev
on Stack Overflow
See other posts from Stack Overflow
or by Misha Koshelev
Published on 2010-06-13T02:40:27Z
Indexed on
2010/06/13
2:42 UTC
Read the original article
Hit count: 365
groovy
Dear All:
I have an interesting dilemma.
If I define my class as:
class Browser {
def swtException
protected Object evaluate(script) throws SWTException {
swtException=null
display.syncExec() {
try {
result=swtBrowser.evaluate(script)
} catch (SWTException swtException) {
Browser.swtException=swtException
}
}
}
I get this rather interesting error:
Exception in thread "Thread-5" org.eclipse.swt.SWTException: Failed to execute runnable (groovy.lang.MissingPropertyException: No such property: swtException for class : com.mksoft.fbautomate.browser.Browser Possible solutions: swtException)
Any ideas???
Thank you! Misha
© Stack Overflow or respective owner