technocreatives / dbc-codegen

Generate Rust structs for messages from a dbc (CAN bus definition) file.
Apache License 2.0
43 stars 22 forks source link

Better error messages for DBC file decoding #31

Open andresv opened 3 years ago

andresv commented 3 years ago

At the moment it just says Could not parse dbc file and prints a lot of numbers in debug mode. No idea what is actually wrong with the file.

It should be better after can-dbc migrated from nom 4 to nom 6: https://github.com/marcelbuesing/can-dbc/commits/nom6

killercup commented 3 years ago

@marcelbuesing not sure where you track this on your end, but I've recently seen nom_supreme which extends nom 6 with a bunch of useful things, including error contexts and nice error printing.

marcelbuesing commented 3 years ago

Yeah it's kind of in can-dbc/#7. Thanks for the hint regarding nom_supreme I wasn't aware of that. I'm stuck in some nom "Incomplete" errors in the nom6 branch currently, maybe it also helps me with that.