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

NmeaAisStaticDataReportParserPartB should detect short messages and provide better exception messages #49

Open
idg10 opened this issue Mar 4, 2020 · 0 comments
Assignees

Comments

@idg10
Copy link
Contributor

idg10 commented Mar 4, 2020

It appears that although in theory Type 24 part B AIS messages should always be 168 bits long, in practice some hardware produces messages that are only 160 bits long.

In these cases, attempts to read fields near the end of the message (e.g., DimensionToStarboard) detect the attempted overrun and throw an exeption, but the message is generic. It would be better if this exception message indicated that the message is shorter than the spec requires, and that the property in question is therefore unavailable.

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

No branches or pull requests

2 participants