GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — process: refs --unhandled-rejections documentation in warning message · nodejs/node@732780f

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • lib/internal/process
    • promises.js
  • test/parallel
    • test-promises-unhandled-proxy-rejections.js
    • test-promises-unhandled-symbol-rejections.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎lib/internal/process/promises.js‎

Copy file name to clipboardExpand all lines: lib/internal/process/promises.js
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,9 @@ function emitUnhandledRejectionWarning(uid, reason) {
134134
'Unhandled promise rejection. This error originated either by ' +
135135
'throwing inside of an async function without a catch block, ' +
136136
'or by rejecting a promise which was not handled with .catch(). ' +
137+
'To terminate the node process on unhandled promise ' +
138+
'rejection, use the CLI flag `--unhandled-rejections=strict` (see ' +
139+
'https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). ' +
137140
`(rejection id: ${uid})`
138141
);
139142
try {
Collapse file

‎test/parallel/test-promises-unhandled-proxy-rejections.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-promises-unhandled-proxy-rejections.js
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ const expectedPromiseWarning = ['Unhandled promise rejection. ' +
1212
'This error originated either by throwing ' +
1313
'inside of an async function without a catch ' +
1414
'block, or by rejecting a promise which was ' +
15-
'not handled with .catch(). (rejection id: 1)'];
15+
'not handled with .catch(). To terminate the ' +
16+
'node process on unhandled promise rejection, ' +
17+
'use the CLI flag `--unhandled-rejections=strict` (see ' +
18+
'https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)'];
1619

1720
function throwErr() {
1821
throw new Error('Error from proxy');
Collapse file

‎test/parallel/test-promises-unhandled-symbol-rejections.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-promises-unhandled-symbol-rejections.js
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ const expectedPromiseWarning = ['Unhandled promise rejection. ' +
1313
'This error originated either by throwing ' +
1414
'inside of an async function without a catch ' +
1515
'block, or by rejecting a promise which was ' +
16-
'not handled with .catch(). (rejection id: 1)'];
16+
'not handled with .catch(). To terminate the ' +
17+
'node process on unhandled promise rejection, ' +
18+
'use the CLI flag `--unhandled-rejections=strict` (see ' +
19+
'https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)'];
1720

1821
common.expectWarning({
1922
DeprecationWarning: expectedDeprecationWarning,

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.