doc: check for errors in listen event#4834
Conversation
doc/api/net.markdown
Outdated
There was a problem hiding this comment.
While you're here, could you fix both comments here and above to be single line comments on its own line?
// 'listening' listenerThere was a problem hiding this comment.
Sure, I fixed a couple other inline comments to be on following lines as well.
|
LGTM |
doc/api/net.markdown
Outdated
There was a problem hiding this comment.
Can you add a space between if and (. And preferably put throw err; on a separate line. Same comment on the other changes.
There was a problem hiding this comment.
I'm also +1 on putting it on the separate line. I can go ahead and do that but it means inconsistencies with other docs. A lot of other docs use if (err) throw err; on a single line.
Do we want if (err) checks to not be single line in the docs?
There was a problem hiding this comment.
My personal preference is for a separate line, but do whatever is currently more consistent. I think the docs working group is planning to add linting for this kind of thing in the future.
There was a problem hiding this comment.
Do whatever the linter is fine with and what's most consistent in that file. We have a rule in place for the space after if, but do not require things like the curly rule yet.
|
LGTM |
In the docs we typically check for errors and surface them. This is IMO a good idea and good practice. This PR adds a check for errors in three places in the `net` docs where it was missing. PR-URL: nodejs#4834 Reviewed-By: Roman Reiss <me@silverwind.io> Reviewd-By: Colin Ihrig <cjihrig@gmail.com>
|
Fixed squashed and update commit message. Thanks for the feedback. |
|
LGTM |
In the docs we typically check for errors and surface them. This is IMO a good idea and good practice. This PR adds a check for errors in three places in the `net` docs where it was missing. PR-URL: #4834 Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Roman Klauke <romaaan.git@gmail.com>>
|
Thanks! Landed in 83e43fb. There were a few trailing whitespace errors which I fixed. |
In the docs we typically check for errors and surface them. This is IMO a good idea and good practice. This PR adds a check for errors in three places in the `net` docs where it was missing. PR-URL: #4834 Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Roman Klauke <romaaan.git@gmail.com>>
In the docs we typically check for errors and surface them. This is IMO a good idea and good practice. This PR adds a check for errors in three places in the `net` docs where it was missing. PR-URL: nodejs#4834 Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Roman Klauke <romaaan.git@gmail.com>>
|
This pr is blocked on being backported until other doc changes make it to LTS |
In the docs we typically check for errors and surface them. This is IMO a good idea and good practice. This PR adds a check for errors in three places in the `net` docs where it was missing. PR-URL: #4834 Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Roman Klauke <romaaan.git@gmail.com>>
In the docs we typically check for errors and surface them. This is IMO a good idea and good practice. This PR adds a check for errors in three places in the `net` docs where it was missing. PR-URL: #4834 Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Roman Klauke <romaaan.git@gmail.com>>
In the docs we typically check for errors and surface them. This is IMO a good idea and good practice. This PR adds a check for errors in three places in the `net` docs where it was missing. PR-URL: #4834 Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Roman Klauke <romaaan.git@gmail.com>>
In the docs we typically check for errors and surface them. This is IMO a good idea and good practice. This PR adds a check for errors in three places in the `net` docs where it was missing. PR-URL: nodejs#4834 Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Roman Klauke <romaaan.git@gmail.com>>
In the docs we typically check for errors and surface them. This is IMO a good
idea and good practice. This PR adds a check for errors in three places in
the
netdocs where it was missing.