-
Notifications
You must be signed in to change notification settings - Fork 3k
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
ssl: Improve documentation #8750
ssl: Improve documentation #8750
Conversation
CT Test Results 2 files 67 suites 49m 39s ⏱️ Results for commit 90551b7. ♻️ This comment has been updated with latest results. To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass. See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally. Artifacts// Erlang/OTP Github Action Bot |
0772780
to
90551b7
Compare
Reason :: closed | timeout | {options, any()} | | ||
error_alert() | reason(). |
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.
what is the value of being more precise in specifying possible error reasons and finally appending reason()
which is term()
?
Is it only for the reader comfort?
why term()
(a very general type spec) is needed? is ssl receiving some of the reasons from other applications and they're unspecified?
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.
Because we can never make a totally specified error reason because we only have complete control over the ssl application and errors can come from inet-driver, socket, crypto, public_key, asn-1. And we never want to specify the whole error term as something that you can match on for even when we have control we like to be able to include descriptive information, but we do have a few subparts that user might want to match. The reason() type was already exported otherwise I probably would have just put term() in the end.
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.
thanks for explanation.
The reason() type was already exported otherwise I probably would have just put term() in the end.
yes. going to reason()
declaration and finding it to be term()
is disappointing.
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.
At least it also has an explanation saying you should not match it :)
No description provided.