diff options
author | Sagi Tsofan <sagitsofan@gmail.com> | 2018-09-21 00:59:22 +0300 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2018-10-11 21:21:36 -0700 |
commit | 82ea7058b6c25ee2c1467665c1b53b2b2b9ca139 (patch) | |
tree | b63c4164162715e77a5f1624ef871055609127f0 /src/node_crypto.h | |
parent | 3f08c004c5c95abc8a2faf7e2ea156c72806b54b (diff) | |
download | android-node-v8-82ea7058b6c25ee2c1467665c1b53b2b2b9ca139.tar.gz android-node-v8-82ea7058b6c25ee2c1467665c1b53b2b2b9ca139.tar.bz2 android-node-v8-82ea7058b6c25ee2c1467665c1b53b2b2b9ca139.zip |
lib: http server, friendly error messages
Improved error message description for the http server binding errors.
Currently changed only in `setupListenHandle`, but needs to be
change all over.
Added new `uvExceptionWithHostPort` function (+export) in
`lib/internal/error.js` that extracts the error message defined by
libuv, using the error code, and returns an error object with the
full error description.
example:
old error message: `listen EADDRINUSE`
new error message: `listen EADDRINUSE: Address already in use`
Removed exportable function `_exceptionWithHostPort` from
`lib/util.js` - exported by accident
Replaced `exceptionWithHostPort` to the new function
`uvExceptionWithHostPort` for a more detailed error.
Fixes: https://github.com/nodejs/node/issues/22936
PR-URL: https://github.com/nodejs/node/pull/22995
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/node_crypto.h')
0 files changed, 0 insertions, 0 deletions