Question #194222 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/194222
Summary changed to:
How to get line number from which a function was called in Sikuli?
Description changed to:
Hello again,
I was wondering if there's a way to get the line number from which a
function was
Question #194222 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/194222
Status: Open = Answered
Roman Podolyan proposed the following answer:
When I read log in IDE console, there is always line number if image not
found (or other error happened) and app exited.
Example:
Question #194222 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/194222
RaiMan proposed the following answer:
Yes is possible by evaluating the stack trace.
But to get it, you first need an exception:
import traceback
def xclick(img):
if exists(img):
Question #194222 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/194222
RaiMan posted a new comment:
@ Roman
LOL, i made a break in between, so you won ;-)
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for
Question #194222 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/194222
Luis Gonzalez posted a new comment:
Oh, and of course, closeApp(appname) within the ELSE clause :)
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer
Question #194222 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/194222
Status: Answered = Solved
Luis Gonzalez confirmed that the question is solved:
Thank you for your answers! There are two reasons why I wouldn't like to
just omit the ELSE clause and let the exception be
Question #194222 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/194222
RaiMan posted a new comment:
Thanks for the finding and talking about it.
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.
7 matches
Mail list logo