def stylusError(rc): ga = Stylus.getTermination() if rc != Stylus.ST_RCSUCCESS and ga != Stylus.STGT_NONE: return ('Stylus Terminated: action(0x%X) reason(0x%X) description(%s)' ) % (Stylus.getTermination(), Stylus.getTerminationReason(), Stylus.getTerminationDescription()) else: return ('Stylus Error: ' + Stylus.errorToString(rc))
def __init__(self, rc): self.rc = rc self.termination = Stylus.getTermination() self.reason = Stylus.getTerminationReason() self.terminationDescription = Stylus.getTerminationDescription() self.msg = stylusError(rc)
def __init__(self,rc): self.rc = rc self.termination = Stylus.getTermination() self.reason = Stylus.getTerminationReason() self.terminationDescription = Stylus.getTerminationDescription() self.msg = stylusError(rc)
def stylusError(rc): ga = Stylus.getTermination() if rc != Stylus.ST_RCSUCCESS and ga != Stylus.STGT_NONE: return ('Stylus Terminated: action(0x%X) reason(0x%X) description(%s)') % (Stylus.getTermination(), Stylus.getTerminationReason(), Stylus.getTerminationDescription()) else: return ('Stylus Error: ' + Stylus.errorToString(rc))