How to implement Try Catch error handling in Sikuli Script
Hello,
When I try to implement the try catch functionality in my script.
Let me explain the scenario first.
I have a file with data
The script goes through each row of the data and dynamically populates data in the software from row 1 and than once it completes the operation it moves to row 2 and continues with the next row of data.
I implemented try catch functionality that should work as follows
try:
somefunction
except Exception:
return(failed)
than the script does a clean up
Basically when I try to implement try, catch functionality and an unexpected issues comes up, I still end up getting internal sikuli errors of image not found, so instead of function returning a failure and continuing on with doing a clean up and moving on to the next row, it fails out in the ide with image not found error.
[error] Stopped
[error] An error occurs at line 117
[error] Error message: Traceback (most recent call last):
File "C:\DOCUME~
status = CC_FindFA()
File "C:\DOCUME~
wait(Pattern(
File "C:\Documents and Settings\xxxx\My Documents\Sikuli X\sikuli-
Line 87, in file C:\DOCUME~
at org.sikuli.
at org.sikuli.
at org.python.
at sun.reflect.
at sun.reflect.
at java.lang.
org.sikuli.
FindFailed: can not find Pattern(
Line 87, in file C:\DOCUME~
So my question is, is it possible to do a try an catch error handling with sikuli, and if so how can be implemented?
Thank you.
P.T.
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Philippe Trounev
- Solved:
- Last query:
- Last reply: