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

extend Error for InvariantViolationException instead of Exception #308

Closed
azjezz opened this issue Dec 10, 2021 · 0 comments
Closed

extend Error for InvariantViolationException instead of Exception #308

azjezz opened this issue Dec 10, 2021 · 0 comments
Assignees
Labels
Priority: Medium This issue may be useful, and needs some attention. Type: BC Break A change that will result in a backward compatibility break in the public API. Type: Enhancement Most issues will probably ask for additions or changes.
Projects
Milestone

Comments

@azjezz
Copy link
Owner

azjezz commented Dec 10, 2021

invariant violations should never be caught, as they indicate you are doing something wrong ( passing an empty array to an API that requests non-empty-array, or an negative number to an API that stats the parameter type is positive-int ), therefor, these should be fixed before even calling the API, not by catching the violation.

we should rename InvariantViolationException to InvariantViolation, and extend Error instead.

@azjezz azjezz added the Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors. label Dec 10, 2021
@azjezz azjezz self-assigned this Dec 10, 2021
@azjezz azjezz added this to To do in v2.0.0 via automation Dec 10, 2021
@azjezz azjezz added this to the 2.0.0 milestone Dec 10, 2021
@azjezz azjezz added Priority: High After critical issues are fixed, these should be dealt with before any further issues. Type: Enhancement Most issues will probably ask for additions or changes. Type: BC Break A change that will result in a backward compatibility break in the public API. Priority: Medium This issue may be useful, and needs some attention. and removed Priority: High After critical issues are fixed, these should be dealt with before any further issues. Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors. labels Dec 10, 2021
@azjezz azjezz mentioned this issue Dec 12, 2021
2 tasks
@azjezz azjezz closed this as completed Jan 8, 2022
v2.0.0 automation moved this from To do to Done Jan 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: Medium This issue may be useful, and needs some attention. Type: BC Break A change that will result in a backward compatibility break in the public API. Type: Enhancement Most issues will probably ask for additions or changes.
Projects
No open projects
Development

No branches or pull requests

1 participant