-
Notifications
You must be signed in to change notification settings - Fork 12
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
Replace general asserts with specific exceptions #184
Comments
I think there is some nuance to the asserts. I think specific exceptions are more helpful for things that couldn't POSSIBLY be correct. However, in this PR I used an assert intentionally so if someone wanted to load larger data and didn't care about the guardrails they could using |
Suggestion: Replace general asserts with specific exceptions based on context.
We currently use a lot of general asserts in the following pattern:
Using specific exceptions -- e.g.,
ValueError
,IndexError
, etc. -- could be more helpful to users.The text was updated successfully, but these errors were encountered: