Mithun Sasidharan
eae0c05697
test: replace assert.throws w/ common.expectsError
...
PR-URL: https://github.com/nodejs/node/pull/17498
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
2017-12-08 16:02:07 -05:00
matzavinos
7f55349079
net: convert to using internal/errors
...
Covert lib/net.js over to using lib/internal/errors.js
- Replace thrown errors in lib/net.js
with errors from lib/internal/errors.
The ERR_INVALID_OPT_VALUE error have been used
in the Server.prototype.listen() method
- Update tests according to the above modifications
PR-URL: https://github.com/nodejs/node/pull/14782
Refs: https://github.com/nodejs/node/issues/11273
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2017-10-15 11:48:38 +08:00
Brian White
2bc7841d0f
test: use random ports where possible
...
This helps to prevent issues where a failed test can keep a bound
socket open long enough to cause other tests to fail with EADDRINUSE
because the same port number is used.
PR-URL: https://github.com/nodejs/node/pull/7045
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Rod Vagg <rod@vagg.org >
2016-06-10 22:30:55 -04:00
Phillip Johnsen
ec49fc8229
net: improve socket.write() error message
...
Informative error messages are very important for developers and could
possibly save hours of debugging and frustration. This improves the error
message thrown when writing invalid data into a socket, by communicating
what's expected compared to what the developer just tried to write.
PR-URL: https://github.com/nodejs/node/pull/5981
Reviewed-By: Brian White <mscdex@mscdex.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-04-01 09:46:01 -07:00