| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
This adds a flag to define the default behavior for unhandled rejections. Three modes exist: `none`, `warn` and `strict`. The first is going to silence all unhandled rejection warnings. The second behaves identical to the current default with the excetion that no deprecation warning will be printed and the last is going to throw an error for each unhandled rejection, just as regular exceptions do. It is possible to intercept those with the `uncaughtException` hook as with all other exceptions as well. This PR has no influence on the existing `unhandledRejection` hook. If that is used, it will continue to function as before. PR-URL: nodejs#26599 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Matheus Marchini <mat@mmarchini.me> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Sorry, something went wrong.
Sorry, something went wrong.
|
@addaleax would you be so kind and have a look at this? Seems like one test fails when run inside of a worker (in the freestyle test suite) and I am not able to reproduce this locally and I don't see any issue with the code as it is :/. |
Sorry, something went wrong.
|
@BridgeAR The assert.strictEqual(origin, 'unhandledRejection', err); line in the uncaughtException handler is failing because origin === 'unhandledException' in the second call. Having err as the third argument to assert.strictEqual is what’s masking the issue here. As for reproducing, ./node --experimental-worker --unhandled-rejections=strict tools/run-worker.js test/parallel/test-promise-unhandled-error.js works for me. |
Sorry, something went wrong.
|
@addaleax the test itself should work though. It works fine on v12 and master but fails with this backport while being executed in a worker. |
Sorry, something went wrong.
This adds a missing return value for the worker specific fatal exception handler.
Sorry, something went wrong.
Sorry, something went wrong.
Sorry, something went wrong.
Sorry, something went wrong.
This adds a missing return value for the worker specific fatal exception handler. PR-URL: #29036 Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
|
Landed on v10.x-staging |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Backporting #26599 was not completely trivial, since there where so many changes that required a work around. Functionality wise it should now be identical.
Checklist