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

Try/except blocks should specify the exception #5

Closed
alkasm opened this issue Jan 25, 2019 · 2 comments
Closed

Try/except blocks should specify the exception #5

alkasm opened this issue Jan 25, 2019 · 2 comments

Comments

@alkasm
Copy link

alkasm commented Jan 25, 2019

For e.g. at https://github.com/varunagrawal/bbox/blob/master/bbox/bbox2d_list.py#L223 (and a couple other blocks in that file, not sure if there are some in others), there is an exception block with no specified exception. That will propagate an arbitrary exception forward as a value error, so if a user catches a value error from that they will be catching any possible exception. In other words, this is shadowing all exceptions as a ValueError.

@varunagrawal
Copy link
Owner

Ah good catch!

@varunagrawal
Copy link
Owner

Fixed.

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

No branches or pull requests

2 participants