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

Update exception chaining logic to remove long traceback #661

Merged
merged 1 commit into from
Nov 4, 2022

Conversation

parasj
Copy link
Contributor

@parasj parasj commented Nov 3, 2022

@phi-line suggested the raise e from None syntax. I tested it out, and it substantially improves the readability of tracebacks. However, I would like to still raise exceptions from cloud SDKs unmodified. Therefore, I convert those usages from raise e to simply raise which raises cloud exceptions without unnecessary chaining (while preserving chaining within the cloud SDKs).

@parasj parasj self-assigned this Nov 3, 2022
@parasj
Copy link
Contributor Author

parasj commented Nov 3, 2022

@phi-line if you have a chance to review, I appreciate your feedback improvements to error reporting.

Copy link
Contributor

@phi-line phi-line left a comment

Choose a reason for hiding this comment

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

I would like to still raise exceptions from cloud SDKs unmodified.

It makes sense to handle cloud SDK exceptions in this way!

@parasj parasj merged commit f5a6686 into main Nov 4, 2022
@parasj parasj deleted the raise-e-from-none branch November 4, 2022 02:39
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.

2 participants