Skip to content

Commit

Permalink
Update error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
tvanderbruggen committed Nov 24, 2016
1 parent f73b203 commit ee8351d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions koheron/koheron.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ def check_ret_array(self, dtype, arr_len):
device_id = self.devices_idx[self.last_device_called]
ret_type = self.cmds_ret_types_list[device_id][self.last_cmd_called]
if not is_std_array(ret_type):
raise TypeError('{}::{} returns a {}.'.format(self.last_device_called, self.last_cmd_called, ret_type))
raise TypeError('Expect call to rcv_array [{}::{} returns a {}].'.format(self.last_device_called, self.last_cmd_called, ret_type))
params = get_std_array_params(ret_type)
if dtype != cpp_to_np_types[params['T']]:
raise TypeError('{}::{} expects elements of type {}.'.format(self.last_device_called, self.last_cmd_called, params['T']))
Expand All @@ -346,7 +346,7 @@ def check_ret_vector(self, dtype):
device_id = self.devices_idx[self.last_device_called]
ret_type = self.cmds_ret_types_list[device_id][self.last_cmd_called]
if not is_std_vector(ret_type):
raise TypeError('{}::{} returns a {}.'.format(self.last_device_called, self.last_cmd_called, ret_type))
raise TypeError('Expect call to rcv_vector [{}::{} returns a {}].'.format(self.last_device_called, self.last_cmd_called, ret_type))
vect_type = get_std_vector_params(ret_type)['T']
if dtype != cpp_to_np_types[vect_type]:
raise TypeError('{}::{} expects elements of type {}.'.format(self.last_device_called, self.last_cmd_called, vect_type))
Expand Down

0 comments on commit ee8351d

Please sign in to comment.