-
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
provide more context to errors #92
Conversation
I'm also not really sure if this implementation is best (what would happen if pint throws a type of error you didn't realise it could throw?), but the result is pretty neat, and closer to what I had imagined for #43 originally. |
I'd say that's a bug which can be fixed normally. I chose to catch |
Inspired by #43, this collects all errors of a kind and raises a single error message. Not sure if the implementation is really the best way, though (one drawback is that the original traceback will be lost).
This also fixes the error message for operations like
reindex
when trying to specify indexers with incompatible units for data variables (it now displays thexarray
error instead of complaining about the incompatible units).examples for the new error messages
cc @TomNicholas
pre-commit run --all-files
whats-new.rst