Skip to content

Add setters and validators #34

@thomasmholder

Description

@thomasmholder

Right now, all header fields are validated only at encode time, which is bad because it obfuscates where something actually goes wrong. Validation should be done at construction and when fields are set via setters (which need to be created).

Additionally, the current validation logic uses ranges to verify that properties are legal, where we should probably be checking to see if they're a member of the appropriate enum. That logic can probably be broken out into static validater functions.

Metadata

Metadata

Assignees

Labels

refactorrewriting or reorganizing existing code

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions