In sub function of Python, setThrowException(False) dosent' work.

Asked by Stranger

In sub function of Python, setThrowException(False) dosent' work.

In sub function:
from sikuli import *
def func_search():
    setThrowException(False)
    find(image)
    setThrowException(True)

In main function, call sub function:
func_search()

After run, SikuliX still report findFailed error if image dosen't exist;

If I change code in main function, it works fine:
setThrowException(False)
find(image)
setThrowException(True)

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

Sorry, but I cannot reproduce this behaviour in SikuliX version 1.1.1

Can you help with this problem?

Provide an answer of your own, or ask Stranger for more information if necessary.

To post a message you must log in.