2 @file corelink_exception.py 3 @brief Handles the underlying DLL error messages 10 Gets the error message for the corresponding error ID. 11 @param error_id id returned by call to the dll. 12 @exception Throws a CorelinkException for the error_id if error_id != 0. 19 self.
update(rhs.msg,rhs.code)
27 self.
error_msg = corelink_const.ERROR_CODE_STRING[code] +
": " + msg
33 error_id = error_id_ctypes.value
36 error_len = ctypes.c_int()
37 corelink_const.LIB.getError.argtypes = [ctypes.POINTER(ctypes.c_int),
38 ctypes.POINTER(ctypes.c_int)]
39 corelink_const.LIB.getError.restype = ctypes.c_char_p
40 msg = corelink_const.LIB.getError(ctypes.byref(error_id_ctypes),
41 ctypes.byref(error_len)).decode(
'UTF-8')
42 if error_len.value ==0:
44 corelink_const.ERROR_CODES[
'ERROR_CODE_NONE'])
def get_dll_exception(error_id_ctypes)
def update(self, msg, code)