-
Notifications
You must be signed in to change notification settings - Fork 6k
Test and Document Exception.__cause__ on NetworkError
#3792
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
Conversation
lemontree210
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a general question: it was my understanding that if we raise some exception from another exception, we don't need to specify any cause explicitly. I think that's the way it's formulated in the docs and I personally have found raise ... from ... quite informative on its own.
If a user wants to check the cause explicitly, I think they can use .__cause__ (as per the same docs).
So what am I missing here? :)
|
Huh. I really just didn't know that. Makes sense that |
Exception.__cause__ on NetworkError
lemontree210
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some punctuation nitpicks in docstring, maybe not even justified :)
Co-authored-by: Dmitry Kolomatskiy <58207913+lemontree210@users.noreply.github.com> Co-authored-by: Harshil <37377066+harshil21@users.noreply.github.com>
Closes #3778 as suggested by Noam in the dev chat.
Tests for
{Base, HTTPX}Requestnot extended yet.