New question #668078 on Sikuli:
https://answers.launchpad.net/sikuli/+question/668078

hi  all

I defined  a step-by-step method , details are as follows :

    def stepExecute(self, runMethod):
        logMsg = 'Class[%(cName)s] Function[%(fName)s] is start.' % {'cName': 
self.BASE_CLASS_NAME, 'fName': runMethod}
        log.write_log(logMsg)
        try:
            runMethod()
        except BusinessOperationFailedException, ex:
            self.stepId = getattr(runMethod, 'stepId', 0)
            self.stepName = getattr(runMethod, 'stepName', 0)
            self.errContents = traceback.format_exc()
            raise BusinessOperationFailedException(ex)
        except Exception, ex:
            self.stepId = getattr(runMethod, 'stepId', 0)
            self.stepName = getattr(runMethod, 'stepName', 0)
            self.errContents = traceback.format_exc()
            raise BusinessUnexpectFailedException(ex)
        finally:
            logMsg = 'Class[%(cName)s] Function[%(fName)s] is end.' % {'cName': 
self.BASE_CLASS_NAME,
                                                                       'fName': 
runMethod}
            log.write_log(logMsg)


When I call this method , an error message is displayed :global name 
'BusinessOperationFailedException' is not defined 




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

_______________________________________________
Mailing list: https://launchpad.net/~sikuli-driver
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp

Reply via email to