-
Notifications
You must be signed in to change notification settings - Fork 30.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
doc: general improvements to events documentation #7480
Conversation
2730b17
to
5ed2bdc
Compare
[`domain`][] module (_Note, however, that the `domain` module has been | ||
deprecated_). | ||
To guard against crashing the Node.js process, a listener can be registered | ||
for the `process.on('uncaughtException')` event or the [`domain`][] module can be |
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.
"the process.on('uncaughtException')
event" is confusing since it's a piece of code and not just the event name.
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.
Perhaps:
To guard against crashing the Node.js process, a listener can be registered on
the `process` object's `'uncaughtException'` event
(e.g. `process.on('uncaughtException', (err) => /* ... */)`) or the [`domain`][] module
can be used...
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.
That seems mostly alright to me, except I think if we're going to have a code example like that, it shouldn't be inline, it takes up too much space IMHO.
Great to see this. Left some comments! |
5ed2bdc
to
7f51b34
Compare
LGTM |
Bump! |
Landing this tomorrow if there are no more comments. |
PR-URL: #7480 Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: #7480 Reviewed-By: James M Snell <jasnell@gmail.com>
Checklist
Affected core subsystem(s)
doc, events
Description of change
general doc improvements
cc @nodejs/documentation