def errcheck(ret, func, args):
 if (ret == (-1)):
  try:
   ec = ctypes.get_errno()
   raise LabJackException(ec, ('Exodriver returned error number %s' % ec))
  except AttributeError:
   raise LabJackException((-1), 'Exodriver returned an error, but LabJackPython is unable to read the error code. Upgrade to Python 2.6 for this functionality.')
 else:
  return ret

def errcheck ( ret , func , args ) : if ( ret == ( - 1 ) ) : try : ec = ctypes . get_errno ( ) raise LabJackException ( ec , ( 'Exodriver returned error number %s' % ec ) ) except AttributeError : raise LabJackException ( ( - 1 ) , 'Exodriver returned an error, but LabJackPython is unable to read the error code. Upgrade to Python 2.6 for this functionality.' ) else : return ret
whenever a function is called through ctypes .