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

Raise better exceptions during encoding #12

Open
StokesMIDE opened this issue Mar 22, 2019 · 0 comments
Open

Raise better exceptions during encoding #12

StokesMIDE opened this issue Mar 22, 2019 · 0 comments
Labels
Encoding Related to the creation of EBML data enhancement New feature or request

Comments

@StokesMIDE
Copy link
Member

Attempting to encode the wrong data type for numeric elements can raise a generic struct.error with a non-specific message (e.g. "cannot convert argument to integer"). It would be better to raise a ValueError with a more descriptive message, containing the element name, the value, and maybe additional information.

This should be fairly easy.

@StokesMIDE StokesMIDE added enhancement New feature or request Encoding Related to the creation of EBML data labels Mar 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Encoding Related to the creation of EBML data enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant