errors: update all internal errors

This updates all internal errors to the new error type. While doing
so it removes unused errors.

A few errors currently seem to have the wrong type. To identify them
later, comments were added next to the error type.

PR-URL: https://github.com/nodejs/node/pull/18857
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
This commit is contained in:
Ruben Bridgewater committed 2018-02-22 13:36:19 +00:00
1 parent 8272c225b1
commit 6e1c25c456
3 files changed
+209 -262

No files matched your search

-13
View File
@@ -305,19 +305,6 @@ assert.strictEqual(
errors.message('ERR_ENCODING_NOT_SUPPORTED', ['enc']),
'The "enc" encoding is not supported');
// Test ERR_HTTP2_HEADER_REQUIRED
assert.strictEqual(
errors.message('ERR_HTTP2_HEADER_REQUIRED', ['test']),
'The test header is required');
// Test ERR_HTTP2_FRAME_ERROR
assert.strictEqual(
errors.message('ERR_HTTP2_FRAME_ERROR', ['foo', 'bar', 'baz']),
'Error sending frame type foo for stream baz with code bar');
assert.strictEqual(
errors.message('ERR_HTTP2_FRAME_ERROR', ['foo', 'bar']),
'Error sending frame type foo with code bar');
// Test error messages for async_hooks
assert.strictEqual(
errors.message('ERR_ASYNC_CALLBACK', ['init']),