doc: modernize and fix code examples in process.md#12381
Closed
vsemozhetbyt wants to merge 5 commits intonodejs:masterfrom
vsemozhetbyt:process.md
Closed
doc: modernize and fix code examples in process.md#12381vsemozhetbyt wants to merge 5 commits intonodejs:masterfrom vsemozhetbyt:process.md
vsemozhetbyt wants to merge 5 commits intonodejs:masterfrom
vsemozhetbyt:process.md
Conversation
Add a line break, remove an unnecessary duplicate word.
benjamingr
approved these changes
Apr 13, 2017
| ```js | ||
| process.on('unhandledRejection', (reason, p) => { | ||
| console.log('Unhandled Rejection at: Promise', p, 'reason:', reason); | ||
| console.log('Unhandled Rejection at:', p, 'reason:', reason); |
Contributor
Author
There was a problem hiding this comment.
Promise is already present now in the output as a prefix for p. Without this fix the output is:
Unhandled Rejection at: Promise Promise {
Member
There was a problem hiding this comment.
Ah, my bad. Thanks for clarifying.
Contributor
Author
There was a problem hiding this comment.
Sorry for not making this clearer before)
jasnell
approved these changes
Apr 13, 2017
lpinca
approved these changes
Apr 14, 2017
thefourtheye
approved these changes
Apr 15, 2017
Contributor
Author
|
Landed in e72ea0d |
vsemozhetbyt
added a commit
that referenced
this pull request
Apr 15, 2017
* Replace `var` by `const`. * Use `console.error()`. * Fix example file name mismatch. * Update output examples. * Fix output readability (add a line break, remove an unnecessary duplicate word). PR-URL: #12381 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
3 tasks
4 tasks
Member
|
Should be landed after #12725. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist
Affected core subsystem(s)
doc, process
varbyconst.console.error().