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

PubSub: Unexpected exception was thrown in a helper thread #4436

Closed
shileiyu opened this issue Nov 22, 2017 · 1 comment
Closed

PubSub: Unexpected exception was thrown in a helper thread #4436

shileiyu opened this issue Nov 22, 2017 · 1 comment
Assignees
Labels
api: pubsub Issues related to the Pub/Sub API. status: duplicate Duplicate.

Comments

@shileiyu
Copy link

shileiyu commented Nov 22, 2017

https://github.com/GoogleCloudPlatform/google-cloud-python/blob/b8cde46273fdf6760d8d0bad5329f02fdb81dca8/pubsub/google/cloud/pubsub_v1/subscriber/_consumer.py#L246-L251

Does the exception here was supposed to throw outside? If so it would make python interpreter output annoying exception trackback. Any reason to do so?

I feel like here should be changed to following code:

except Exception as exc:
    self._policy.on_exception(exc)
    self.stop_consuming()
@dhermes dhermes added api: pubsub Issues related to the Pub/Sub API. status: investigating The issue is under investigation, which is determined to be non-trivial. labels Nov 22, 2017
@chemelnucfin chemelnucfin changed the title Unexpected exception was threw in a helper thread PubSub: Unexpected exception was threw in a helper thread Nov 22, 2017
@dhermes dhermes changed the title PubSub: Unexpected exception was threw in a helper thread PubSub: Unexpected exception was thrown in a helper thread Nov 27, 2017
@dhermes
Copy link
Contributor

dhermes commented Nov 28, 2017

After understanding the purpose of #4445, it seems this issue is a duplicate of #4463.

Thanks for filing (and sending the PR) @shileiyu!

@dhermes dhermes closed this as completed Nov 28, 2017
@dhermes dhermes added status: duplicate Duplicate. and removed status: investigating The issue is under investigation, which is determined to be non-trivial. labels Nov 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: pubsub Issues related to the Pub/Sub API. status: duplicate Duplicate.
Projects
None yet
Development

No branches or pull requests

2 participants