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

ssl: Improve documentation #8750

Merged

Conversation

IngelaAndin
Copy link
Contributor

No description provided.

@IngelaAndin IngelaAndin requested review from dgud and u3s August 27, 2024 08:20
@IngelaAndin IngelaAndin self-assigned this Aug 27, 2024
@IngelaAndin IngelaAndin added team:PS Assigned to OTP team PS testing currently being tested, tag is used by OTP internal CI labels Aug 27, 2024
Copy link
Contributor

github-actions bot commented Aug 27, 2024

CT Test Results

    2 files     67 suites   49m 39s ⏱️
  791 tests   747 ✅  44 💤 0 ❌
3 760 runs  2 966 ✅ 794 💤 0 ❌

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

@IngelaAndin IngelaAndin force-pushed the ingela/ssl/doc_return_enhanchment branch from 0772780 to 90551b7 Compare August 27, 2024 08:59
Comment on lines +2136 to +2137
Reason :: closed | timeout | {options, any()} |
error_alert() | reason().
Copy link
Contributor

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?

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 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.

Copy link
Contributor

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.

Copy link
Contributor Author

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 :)

@IngelaAndin IngelaAndin merged commit 537e272 into erlang:maint Aug 29, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team:PS Assigned to OTP team PS testing currently being tested, tag is used by OTP internal CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants