summaryrefslogtreecommitdiff
path: root/test/parallel/test-event-emitter-errors.js
AgeCommit message (Collapse)Author
2019-01-23events: show inspected error in uncaught 'error' messageAnna Henningsen
If there is no handler for `.emit('error', value)` and `value` is not an `Error` object, we currently just call `.toString()` on it. Almost always, using `util.inspect()` provides better information for diagnostic purposes, so prefer to use that instead. Refs: https://github.com/nodejs/help/issues/1729 PR-URL: https://github.com/nodejs/node/pull/25621 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Matheus Marchini <mat@mmarchini.me>
2017-10-13events: migrate to internal/errorsJames M Snell
PR-URL: https://github.com/nodejs/node/pull/15623 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2017-07-21lib,src: fix consistent spacing inside bracesSebastiaan Deckers
PR-URL: https://github.com/nodejs/node/pull/14162 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2017-03-24events: update and clarify error messageChris Burkhart
Update error message that's thrown when no error listeners are attached to an emitter. PR-URL: https://github.com/nodejs/node/pull/10387 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Italo A. Casas <me@italoacasas.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
2017-01-11test: use eslint to fix var->const/letGibson Fahnestock
Manually fix issues that eslint --fix couldn't do automatically. PR-URL: https://github.com/nodejs/node/pull/10685 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
2017-01-02test: use const for all require() callscjihrig
PR-URL: https://github.com/nodejs/node/pull/10550 Reviewed-By: Rich Trott <rtrott@gmail.com>
2015-10-01test: load common.js to test for global leaksRich Trott
common.js contains code that checks for variables leaking into the global namespace. Load common.js in all tests that do not intentionally leak variables. PR-URL: https://github.com/nodejs/node/pull/3095 Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2015-05-19test: enable linting for testsRoman Reiss
Enable linting for the test directory. A number of changes was made so all tests conform the current rules used by lib and src directories. The only exception for tests is that unreachable (dead) code is allowed. test-fs-non-number-arguments-throw had to be excluded from the changes because of a weird issue on Windows CI. PR-URL: https://github.com/nodejs/io.js/pull/1721 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-05-12events: provide better error message for unhandled errorEvan Lucas
Previously, in the event of an unhandled error event, if the error is a not an actual Error, then a default error is thrown. Now, the argument is appended to the error message and added as the `context` property of the error. PR-URL: https://github.com/iojs/io.js/pull/1654 Reviewed-By: Rod Vagg <rod@vagg.org> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>