Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CANPacker: some exceptions are silent #902

Open
sshane opened this issue Jul 18, 2023 · 1 comment
Open

CANPacker: some exceptions are silent #902

sshane opened this issue Jul 18, 2023 · 1 comment
Labels

Comments

@sshane
Copy link
Contributor

sshane commented Jul 18, 2023

For example, since we don't propagate exceptions from this function, if you pass certain inputs to make_can_msg (like a list instead of dict), you'll get an exception that Python never knows about. But do we never want to throw an exception? Related: #500

cdef vector[uint8_t] pack(self, addr, values):
cdef vector[SignalPackValue] values_thing
values_thing.reserve(len(values))
cdef SignalPackValue spv
for name, value in values.iteritems():
spv.name = name.encode("utf8")
spv.value = value
values_thing.push_back(spv)
return self.packer.pack(addr, values_thing)

@sshane sshane added the bug label Jul 18, 2023
@sshane
Copy link
Contributor Author

sshane commented Aug 8, 2023

@adeebshihadeh I think this is worth raising an exception for, rather than adding to the valid flag for wrong signals we want to add. What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant