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

doc: modernize and fix code examples in process.md #12381

Closed
wants to merge 5 commits into from

Conversation

@vsemozhetbyt
Copy link
Contributor

commented Apr 13, 2017

Checklist
Affected core subsystem(s)

doc, process

  • Replace var by const.
  • Use console.error().
  • Fix example file name mismatch (compare with the previous example description).
  • Update output examples.
  • Increase output readability (add a line break, remove an unnecessary duplicate word).
@@ -231,7 +231,7 @@ For example:

```js
process.on('unhandledRejection', (reason, p) => {
console.log('Unhandled Rejection at: Promise', p, 'reason:', reason);
console.log('Unhandled Rejection at:', p, 'reason:', reason);

This comment has been minimized.

Copy link
@benjamingr

benjamingr Apr 13, 2017

Member

why this change?

This comment has been minimized.

Copy link
@vsemozhetbyt

vsemozhetbyt Apr 13, 2017

Author Contributor

Promise is already present now in the output as a prefix for p. Without this fix the output is:

Unhandled Rejection at: Promise Promise {

This comment has been minimized.

Copy link
@benjamingr

benjamingr Apr 13, 2017

Member

Ah, my bad. Thanks for clarifying.

This comment has been minimized.

Copy link
@vsemozhetbyt

vsemozhetbyt Apr 13, 2017

Author Contributor

Sorry for not making this clearer before)

@refack refack force-pushed the nodejs:master branch to fbe946b Apr 14, 2017

@lpinca
lpinca approved these changes Apr 14, 2017
@vsemozhetbyt

This comment has been minimized.

Copy link
Contributor Author

commented Apr 15, 2017

Landed in e72ea0d

@vsemozhetbyt vsemozhetbyt deleted the vsemozhetbyt:process.md branch Apr 15, 2017

vsemozhetbyt added a commit that referenced this pull request Apr 15, 2017
doc: modernize and fix code examples in process.md
* 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>
@jasnell jasnell referenced this pull request May 11, 2017
@gibfahn gibfahn referenced this pull request Jun 15, 2017
2 of 3 tasks complete
@gibfahn gibfahn referenced this pull request Jun 18, 2017
4 of 4 tasks complete
@gibfahn

This comment has been minimized.

Copy link
Member

commented Jun 18, 2017

Should be landed after #12725.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants
You can’t perform that action at this time.