Please sign in to comment.
dgram: convert to using internal/errors
Covert lib/dgram.js over to using lib/internal/errors.js for generating Errors. See [using-internal-errors.md](https://github.com/nodejs/node/blob/master/doc/guides/using-internal-errors.md) for more details. I have not addressed the cases that use errnoException() and exceptionWithHostPort() helper methods as changing these would require fixing the tests across all of the different files that use them. In addition, these helpers already add a `code` to the Error and we'll have to discuss how that interacts with the `code` used by lib/internal/errors.js. I believe we should convert all users of errnoException and exceptionWithHostPort in a PR dedicated to that conversion. PR-URL: #12926 Reviewed-By: James M Snell <email@example.com> Reviewed-By: Franziska Hinkelmann <firstname.lastname@example.org> Reviewed-By: Ruben Bridgewater <email@example.com>
- Loading branch information...
Showing with 167 additions and 47 deletions.
- +29 −0 doc/api/errors.md
- +43 −21 lib/dgram.js
- +6 −0 lib/internal/errors.js
- +5 −1 test/parallel/test-dgram-bind.js
- +6 −2 test/parallel/test-dgram-createSocket-type.js
- +1 −1 test/parallel/test-dgram-implicit-bind-failure.js
- +28 −8 test/parallel/test-dgram-membership.js
- +5 −1 test/parallel/test-dgram-multicast-setTTL.js
- +8 −5 test/parallel/test-dgram-send-address-types.js
- +31 −7 test/parallel/test-dgram-sendto.js
- +5 −1 test/parallel/test-dgram-setTTL.js
Oops, something went wrong.