Skip to content

More specific exception swallowing. #746

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

Merged
merged 1 commit into from
Jan 5, 2017
Merged

More specific exception swallowing. #746

merged 1 commit into from
Jan 5, 2017

Conversation

jerjou
Copy link
Contributor

@jerjou jerjou commented Jan 5, 2017

No description provided.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jan 5, 2017
pass
except grpc.RpcError as e:
code = e.code()
if code is code.CANCELLED:
Copy link
Contributor

@theacodes theacodes Jan 5, 2017

Choose a reason for hiding this comment

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

why not:

if code is not code.CANCELLED:
   raise

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because that would be way too clean, clearly.

@jerjou jerjou force-pushed the speech-exceptions branch from 1928775 to 03ffb45 Compare January 5, 2017 17:56
@theacodes theacodes merged commit 62954e9 into master Jan 5, 2017
@theacodes theacodes deleted the speech-exceptions branch January 5, 2017 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants