Commit f2e3a670 authored by Michael Dawson's avatar Michael Dawson Committed by James M Snell
Browse files

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: https://github.com/nodejs/node/pull/12926


Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
Reviewed-By: default avatarFranziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: default avatarRuben Bridgewater <ruben.bridgewater@fintura.de>
parent e012f5a4
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment