← Back to team overview

sikuli-driver team mailing list archive

[Bug 1214291] Re: [1.0.1] - Java exception when terminating script using sys.exit()

 

** Changed in: sikuli
       Status: In Progress => Fix Committed

-- 
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1214291

Title:
  [1.0.1] - Java exception when terminating script using sys.exit()

Status in Sikuli:
  Fix Committed

Bug description:
  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

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1214291/+subscriptions


References