Skip to content

Move selector validation to Selector constructor #1041

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

Open
JakeQZ opened this issue Feb 28, 2025 · 0 comments
Open

Move selector validation to Selector constructor #1041

JakeQZ opened this issue Feb 28, 2025 · 0 comments

Comments

@JakeQZ
Copy link
Collaborator

JakeQZ commented Feb 28, 2025

Selector::isValid() is currently used by callers before creating a Selector. In all those cases an exception is thrown if it is not valid. It would be cleaner if the Selector constructor handled that check and itself threw the exception.

However, there may be cases where a Selector is constructed without this check, including in third-party code...

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

No branches or pull requests

1 participant