Skip to content

Commit 1f426ba

Browse files
pmarchiniaduh95
authored andcommittedFeb 3, 2025
test_runner: remove unused errors
PR-URL: #56607 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jacob Smith <jacob@frende.me>
1 parent d3c0a28 commit 1f426ba

File tree

2 files changed

+19
-34
lines changed

2 files changed

+19
-34
lines changed
 

‎doc/api/errors.md

+19-19
Original file line numberDiff line numberDiff line change
@@ -2816,25 +2816,6 @@ An unspecified or non-specific system error has occurred within the Node.js
28162816
process. The error object will have an `err.info` object property with
28172817
additional details.
28182818

2819-
<a id="ERR_TAP_LEXER_ERROR"></a>
2820-
2821-
### `ERR_TAP_LEXER_ERROR`
2822-
2823-
An error representing a failing lexer state.
2824-
2825-
<a id="ERR_TAP_PARSER_ERROR"></a>
2826-
2827-
### `ERR_TAP_PARSER_ERROR`
2828-
2829-
An error representing a failing parser state. Additional information about
2830-
the token causing the error is available via the `cause` property.
2831-
2832-
<a id="ERR_TAP_VALIDATION_ERROR"></a>
2833-
2834-
### `ERR_TAP_VALIDATION_ERROR`
2835-
2836-
This error represents a failed TAP validation.
2837-
28382819
<a id="ERR_TEST_FAILURE"></a>
28392820

28402821
### `ERR_TEST_FAILURE`
@@ -3847,6 +3828,25 @@ removed: v10.0.0
38473828
Used when an attempt is made to use a readable stream that has not implemented
38483829
[`readable._read()`][].
38493830

3831+
<a id="ERR_TAP_LEXER_ERROR"></a>
3832+
3833+
### `ERR_TAP_LEXER_ERROR`
3834+
3835+
An error representing a failing lexer state.
3836+
3837+
<a id="ERR_TAP_PARSER_ERROR"></a>
3838+
3839+
### `ERR_TAP_PARSER_ERROR`
3840+
3841+
An error representing a failing parser state. Additional information about
3842+
the token causing the error is available via the `cause` property.
3843+
3844+
<a id="ERR_TAP_VALIDATION_ERROR"></a>
3845+
3846+
### `ERR_TAP_VALIDATION_ERROR`
3847+
3848+
This error represents a failed TAP validation.
3849+
38503850
<a id="ERR_TLS_RENEGOTIATION_FAILED"></a>
38513851

38523852
### `ERR_TLS_RENEGOTIATION_FAILED`

‎lib/internal/errors.js

-15
Original file line numberDiff line numberDiff line change
@@ -1742,21 +1742,6 @@ E('ERR_STREAM_WRAP', 'Stream has StringDecoder set or is in objectMode', Error);
17421742
E('ERR_STREAM_WRITE_AFTER_END', 'write after end', Error);
17431743
E('ERR_SYNTHETIC', 'JavaScript Callstack', Error);
17441744
E('ERR_SYSTEM_ERROR', 'A system error occurred', SystemError, HideStackFramesError);
1745-
E('ERR_TAP_LEXER_ERROR', function(errorMsg) {
1746-
hideInternalStackFrames(this);
1747-
return errorMsg;
1748-
}, Error);
1749-
E('ERR_TAP_PARSER_ERROR', function(errorMsg, details, tokenCausedError, source) {
1750-
hideInternalStackFrames(this);
1751-
this.cause = tokenCausedError;
1752-
const { column, line, start, end } = tokenCausedError.location;
1753-
const errorDetails = `${details} at line ${line}, column ${column} (start ${start}, end ${end})`;
1754-
return errorMsg + errorDetails;
1755-
}, SyntaxError);
1756-
E('ERR_TAP_VALIDATION_ERROR', function(errorMsg) {
1757-
hideInternalStackFrames(this);
1758-
return errorMsg;
1759-
}, Error);
17601745
E('ERR_TEST_FAILURE', function(error, failureType) {
17611746
hideInternalStackFrames(this);
17621747
assert(typeof failureType === 'string' || typeof failureType === 'symbol',

0 commit comments

Comments
 (0)
Please sign in to comment.