← Back to team overview

sikuli-driver team mailing list archive

[Question #234296]: [1.0.1] - Java exception raised when terminating Sikuli script

 

New question #234296 on Sikuli:
https://answers.launchpad.net/sikuli/+question/234296

Hi,

I have a loop which attempted to detect an image for defined number of times.
If the image is not detected after all the attempts - it will exit:

sys.exit("%s test step FAILED!" %(testName))

This approach was working fine in 1.0.0 (example below) however after I have started using 1.0.1, I started experiencing the following java exception:

Exception in thread "MainThread" java.lang.IllegalStateException: No match found

        at java.util.regex.Matcher.group(Unknown Source)
        at org.sikuli.scriptrunner.JythonScriptRunner.findErrorSourceWalkTrace(JythonScriptRunner.java:309)
        at org.sikuli.scriptrunner.JythonScriptRunner.findErrorSource(JythonScriptRunner.java:273)
        at org.sikuli.scriptrunner.JythonScriptRunner.runPython(JythonScriptRunner.java:183)
        at org.sikuli.scriptrunner.JythonScriptRunner.runScript(JythonScriptRunner.java:147)
        at org.sikuli.basics.SikuliScript.main(SikuliScript.java:179)


The overall logic still works but I guess I'm doing something wrong if it results with an exception?



In 1.0.0 version, if I was terminating a script with "sys.exit()", I was getting the following error instead:

[error] Script aborted with some error:

Which looks much more harmless.



Thanks!
Eugene

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.