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

Fix exception causes all over the codebase #16706

Merged
merged 1 commit into from Mar 9, 2020

Conversation

cool-RR
Copy link
Contributor

@cool-RR cool-RR commented Mar 7, 2020

PR Summary

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

@cool-RR
Copy link
Contributor Author

cool-RR commented Mar 8, 2020

@timhoffm Ready for review

@jklymak
Copy link
Member

jklymak commented Mar 9, 2020

Maybe you could include a few words as to why we want to use this grammar?

@jklymak jklymak requested a review from timhoffm March 9, 2020 16:49
@cool-RR
Copy link
Contributor Author

cool-RR commented Mar 9, 2020

@jklymak This is the final part of #16684.

Basically this makes the right message appear between the two tracebacks.

Copy link
Member

@jklymak jklymak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These all look fine to me. Would be nice if the test coverage was better, but don't expect you to write a bunch of tests that trigger exceptions...

@tacaswell tacaswell merged commit 266d797 into matplotlib:master Mar 9, 2020
@tacaswell
Copy link
Member

Thanks @cool-RR !

This was referenced Jun 12, 2020
@cool-RR
Copy link
Contributor Author

cool-RR commented Jun 24, 2020

I just made a blog post about this change here: https://blog.ram.rachum.com/post/621791438475296768/improving-python-exception-chaining-with

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

Successfully merging this pull request may close these issues.

None yet

4 participants