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

Rationalise Error classes #296

Open
scott-griffiths opened this issue Sep 26, 2023 · 0 comments
Open

Rationalise Error classes #296

scott-griffiths opened this issue Sep 26, 2023 · 0 comments
Assignees
Milestone

Comments

@scott-griffiths
Copy link
Owner

I can't remember the motivation for having so many specialised error classes (I suspect just because I could) and they can become a bit annoying.

Sometimes a given issue should be an InterpretError, and sometimes a CreationError depending on the context the code is used in. Both derive from ValueError, and I think I'd be happy for them both to be ValueErrors.

Similarly ReadError derives from IndexError and doesn't add anything to it.

ByteAlignError is at least a bit distinctive, and gives slightly more information than alternatives.

Suggest that for version 4.2 we change from deriving from the base class to just being an alias for it. That shouldn't break any code and would allow some simplifications

@scott-griffiths scott-griffiths added this to the 4.2 milestone Sep 26, 2023
@scott-griffiths scott-griffiths self-assigned this Sep 26, 2023
@scott-griffiths scott-griffiths modified the milestones: 4.2, 4.3 Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant