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
Closed

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

wants to merge 5 commits into from

Conversation

vsemozhetbyt
Copy link
Contributor

@vsemozhetbyt vsemozhetbyt 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).

@vsemozhetbyt vsemozhetbyt added doc Issues and PRs related to the documentations. process Issues and PRs related to the process subsystem. labels Apr 13, 2017
@nodejs-github-bot nodejs-github-bot added doc Issues and PRs related to the documentations. process Issues and PRs related to the process subsystem. labels Apr 13, 2017
@@ -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);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why this change?

Copy link
Contributor Author

@vsemozhetbyt vsemozhetbyt Apr 13, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Unhandled Rejection at: Promise Promise {

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, my bad. Thanks for clarifying.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for not making this clearer before)

@vsemozhetbyt
Copy link
Contributor Author

Landed in e72ea0d

@vsemozhetbyt vsemozhetbyt deleted the process.md branch April 15, 2017 11:32
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 <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
@jasnell jasnell mentioned this pull request May 11, 2017
@gibfahn gibfahn mentioned this pull request Jun 15, 2017
3 tasks
@gibfahn
Copy link
Member

gibfahn 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
Labels
doc Issues and PRs related to the documentations. process Issues and PRs related to the process subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants