| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 178acac commit 1bcbc70
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -134,6 +134,9 @@ function emitUnhandledRejectionWarning(uid, reason) { | |||
| 134 | 134 | 'Unhandled promise rejection. This error originated either by ' + | |
| 135 | 135 | 'throwing inside of an async function without a catch block, ' + | |
| 136 | 136 | '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). ' + | ||
| 137 | 140 | `(rejection id: ${uid})` | |
| 138 | 141 | ); | |
| 139 | 142 | try { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -12,7 +12,10 @@ const expectedPromiseWarning = ['Unhandled promise rejection. ' + | |||
| 12 | 12 | 'This error originated either by throwing ' + | |
| 13 | 13 | 'inside of an async function without a catch ' + | |
| 14 | 14 | '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)']; | ||
| 16 | 19 | ||
| 17 | 20 | function throwErr() { | |
| 18 | 21 | throw new Error('Error from proxy'); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -13,7 +13,10 @@ const expectedPromiseWarning = ['Unhandled promise rejection. ' + | |||
| 13 | 13 | 'This error originated either by throwing ' + | |
| 14 | 14 | 'inside of an async function without a catch ' + | |
| 15 | 15 | '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)']; | ||
| 17 | 20 | ||
| 18 | 21 | common.expectWarning({ | |
| 19 | 22 | DeprecationWarning: expectedDeprecationWarning, | |
| Back | FazBrowse Home | New Git URL |
0 commit comments