errors: add internal/errors.js
Checklist
-
make -j8 test
(UNIX), orvcbuild test nosign
(Windows) passes -
tests and/or benchmarks are included -
commit message follows commit guidelines
Affected core subsystem(s)
errors
Description of change
A more incremental version of https://github.com/nodejs/node/pull/6573. Introduces the internal/errors.js module and begins updating errors in the internal modules to use it. This is intentionally incomplete. Other errors can be migrated over to this incrementally.
This is semver-major because several of the error messages are updated in the process.