[HowTo] User defined exceptions to handle FindFailed
Hi!
I want to define my own exception, is that possible? I have been reading through some python and jython documentation but would not be able to get it.
I know that i should define a exception as a class, like this:
class MyException(
def __init__(self)
+some more code
But how would be the best way to continue if I want to get my exception to work as the FindFailed exception?
The reason I would like to use user defined excetions is that I would run a script where several images could be either be there or not. And I want to do different things according on what exception who is raised. Probably I could use the FindFailed exception, but then what to do when several exceptions is raised and everybody is refered to as find failed?
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- RaiMan
- Solved:
- Last query:
- Last reply: