← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #284645]: How to get caller script error details

 

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

Karl proposed the following answer:
Please read similar questions. The following is adapted from
https://answers.launchpad.net/sikuli/+question/194222 Comment #4.

import traceback
def getCurrentLineNumberWithTraceback():
    return traceback.extract_stack(limit = 2)[0][1]

Usage:
print getCurrentLineNumberWithTraceback()

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.