summaryrefslogtreecommitdiff
path: root/test/parallel/test-internal-error-original-names.js
AgeCommit message (Collapse)Author
2019-03-23errors: update error nameRuben Bridgewater
This updates all Node.js errors by removing the `code` being part of the `name` property. Instead, the name is just changed once on instantiation, the stack is accessed to create the stack as expected and then the `name` property is set back to it's original form. PR-URL: https://github.com/nodejs/node/pull/26738 Fixes: https://github.com/nodejs/node/issues/26669 Fixes: https://github.com/nodejs/node/issues/20253 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Michaƫl Zasso <targos@protonmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2018-09-17errors: add useOriginalName to internal/errorsJoyee Cheung
This allows us to tell the type of the errors without using instanceof, which is necessary in WPT harness. PR-URL: https://github.com/nodejs/node/pull/22556 Reviewed-By: John-David Dalton <john.david.dalton@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Refael Ackermann <refack@gmail.com>