Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
doc: increase output readability in process.md
Add a line break, remove an unnecessary duplicate word.
  • Loading branch information
vsemozhetbyt committed Apr 13, 2017
commit 35479078701a470c18860d0068567ae955b1f682
4 changes: 2 additions & 2 deletions doc/api/process.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ For example:

```js
process.on('uncaughtException', (err) => {
fs.writeSync(1, `Caught exception: ${err}`);
fs.writeSync(1, `Caught exception: ${err}\n`);
});

setTimeout(() => {
Expand Down Expand Up @@ -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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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)

// application specific logging, throwing an error, or other logic here
});

Expand Down