Can Sikuli throw an exception if image file is not found?

Asked by Spencer Keller on 2017-03-08

Is there a way to get Sikuli to throw and Exception if it can not find the image file? Currently all it does is issue an "[error] Image: could not be loaded: ..." to stdout. I know that I can use the Pattern class and call its' "isValid()" method but I would have to change an awful lot of code to do this. Any suggestions?

Thanks

Question information

Language:
English Edit question
Status:
Solved
For:
Sikuli Edit question
Assignee:
No assignee Edit question
Solved by:
Spencer Keller
Solved:
2017-03-09
Last query:
2017-03-09
Last reply:
2017-03-09
RaiMan (raimund-hocke) said : #1

with version 1.1.1 you have more options.
Carefully read this and make your decision:
http://sikulix-2014.readthedocs.io/en/latest/region.html#exception-findfailed

Thanks so much. I guess I have a decision to make. :)