nikgoodley-ibboost / sikuli-api

Automatically exported from code.google.com/p/sikuli-api
0 stars 0 forks source link

The Sikuli 1.0.0 .jar does not contain the FindFailed class from sikuli-script.jar #2

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a very basic Java class that performs a Sikuli script and import 
org.sikuli.script.FindFailed;
2. Wrap your Sikuli script actions in a try-catch block and catch the missing 
exception like so:
  catch( FindFailed e ) {
     Assert.fail( "Error with Sikuli script: " + e.getMessage() );
     e.printStackTrace();
     throw new AssertionError( e.getMessage() );
  }

What is the expected output? What do you see instead?
  Currently this code works fine with the 1.0.0 version of sikuli .jar  but in order for it to work I also need to include in my project the version 1.0rc3 Sikuli-script.jar  resource.   This is because the above mentioned class is missing from the 1.0.0 sikuli jar that was release in mid-October 2012.

What version of the product are you using? On what operating system?

Please provide any additional information below.

Original issue reported on code.google.com by auste...@gmail.com on 24 Oct 2012 at 5:40

GoogleCodeExporter commented 9 years ago
In Sikuli API, there is no longer need for FindFailed. When find operations 
fail, a null pointer will be returned in the case of find(). An empty list of 
ScreenRegion objects will be returned in the case of findAll(). There is no 
need to catch FindFailled exceptions. However, users can feel free to wrap a 
custom exception around the null pointer returned by find().

Original comment by doubles...@gmail.com on 28 Oct 2012 at 1:30