← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #230684]: [Sikuli Java API] FindFail VS null pointer

 

Question #230684 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/230684

j posted a new comment:
Just an addition: In SikuliScript, you can change the fail behaviour
with

region.setThrowException(false)

then you have the same behaviour as in sikuli API, null is returned.
I don't remember if the same thing is possible in Sikuli API to switch the exceptions on.

In my opinion the (default) behaviour of find operations was switched to
"return null" because this is nicer to handle with one if() instead of a
try() catch(), but this is just my guess, I haven't implemented Sikuli
API ;-)

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