Custom Exception meant for dealing specifically with U12 Exceptions. Error codes are either going to be a LabJackUD error code or a -1. The -1 implies a python wrapper specific error. def __init__(self, ec = 0, errorString = ''): self.errorCode = ec self.errorString = e
| 42 | ON_WINDOWS = (os.name == 'nt') |
| 43 | |
| 44 | class U12Exception(Exception): |
| 45 | """Custom Exception meant for dealing specifically with U12 Exceptions. |
| 46 | |
| 47 | Error codes are either going to be a LabJackUD error code or a -1. The -1 implies |
| 48 | a python wrapper specific error. |
| 49 | def __init__(self, ec = 0, errorString = ''): |
| 50 | self.errorCode = ec |
| 51 | self.errorString = errorString |
| 52 | |
| 53 | if not self.errorString: |
| 54 | #try: |
| 55 | self.errorString = getErrorString(ec) |
| 56 | #except: |
| 57 | # self.errorString = str(self.errorCode) |
| 58 | |
| 59 | def __str__(self): |
| 60 | return self.errorString |
| 61 | |
| 62 | """ |
| 63 | pass |
| 64 | |
| 65 | class BitField(object): |
| 66 | """ |
no outgoing calls
no test coverage detected