tradt / sikuli-api

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

FindFail VS null pointer #62

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi sikuli team !

sikuli script was throwing a findfail exception when no match were found on the 
screen whereas sikuli API simply returns a null match pointer.

Is there any philosophical/design reason behind this change of behavior ?

Can a flag (to switch between those two behaviors) be considered a new feature ?

Thanks

Original issue reported on code.google.com by hypn...@donarproject.org on 13 Jun 2013 at 12:14

GoogleCodeExporter commented 9 years ago
Hi all!

I've been wondering the exact same thing!

Exception vs null behavior is always subject to debate but to my opinion 
sticking to Exception behavior in Sikuli API would be way more flexible 
especially as it would allow for distinction between not found element and 
timeout.

Thanks.

Original comment by gael.wog...@gmail.com on 19 Jul 2013 at 6:31