Repository navigation
Closed
Labels
errorsIssues and PRs related to JavaScript errors originating in Node.js core.Issues and PRs related to JavaScript errors originating in Node.js core.good first issueIssues that are suitable for first-time contributors.Issues that are suitable for first-time contributors.lib / srcIssues and PRs involving general changes in the lib/ or src/ directories.Issues and PRs involving general changes in the lib/ or src/ directories.
Description
There are a few old-style errors added since #11273 opened. Opening a new issue to track the migration. I have excluded errors that have existing code property as changing those could result in bigger breakages.
On how to migrate those errors, see the guide: Using the internal/errors.js Module
- lib/_http_outgoing.js - lib, test: migrate _http_outgoing.js's remaining errors to internal/errors.js #17837
new Error('write after end'): can be migrated toERR_STREAM_WRITE_AFTER_ENDnew Error('Cannot pipe, not readable')): can be migrated toERR_STREAM_CANNOT_PIPE
- lib/_tls_legacy.js - tls: comment about old-style errors #17759
should not be migrated because it's being deprecated. Add a comment there instead.new Error('TLS session renegotiation attack detected'): can be migrated toERR_TLS_SESSION_ATTACK
- lib/_tls_wrap.js - _tls_wrap: Migrate the errors to internal/errors #17709 #17792
new Error('TLS session renegotiation disabled for this socket'): needs a new error, maybeERR_TLS_RENEGOTIATION_DISABLED
- lib/fs.js - lib: migrate errors to internal/errors #17719
new Error('Invalid data')): can be migrated toERR_INVALID_ARG_TYPE
- lib/net.js - net: migrate errors to internal/errors #17766
new Error('This socket is closed'), cb): can be migrated toERR_SOCKET_CLOSEDnew Error('Not running')): needs a new error, maybeERR_SERVER_NOT_RUNNING
- lib/repl.js - repl: migrate errors to internal/errors #17716
new Error('Script execution interrupted.')): needs a new error, maybeERR_SCRIPT_EXECUTION_INTERRUPTED
Metadata
Metadata
Assignees
Labels
errorsIssues and PRs related to JavaScript errors originating in Node.js core.Issues and PRs related to JavaScript errors originating in Node.js core.good first issueIssues that are suitable for first-time contributors.Issues that are suitable for first-time contributors.lib / srcIssues and PRs involving general changes in the lib/ or src/ directories.Issues and PRs involving general changes in the lib/ or src/ directories.
Activity
joyeecheung commentedon Dec 16, 2017
Just like #11273 this should be a good first issue. People who want to start working on this can post a reply here, and cc @jasnell and me in the PR. There is a guide on how to migrate the errors, also please read the contributing guide on how to format the commit and the PR process. It's ok if you want to take multiple tasks in the OP but I would prefer one file per person so more people get the opportunity to start contributing to core.
The tests would almost definitely fail after the errors in
libhave been changed, so please fix the tests accordingly and make suremake testpasses before submitting the PR. If no tests fail after the change, please add one by following the guidemannanali413 commentedon Dec 16, 2017
@joyeecheung @jasnell i can take these up.
lossycache commentedon Dec 17, 2017
@joyeecheung @jasnell I can take one of these files as well
b0yfriend commentedon Dec 17, 2017
@joyeecheung @jasnell I'd like to tackle
lib/_http_outgoing.js's error migration!joyeecheung commentedon Dec 17, 2017
@ramsgoli @mannanali413 Hi, please indicate which file you are going to work on in this thread to avoid stepping over each other's toes, thanks!
kysnm commentedon Dec 17, 2017
@joyeecheung @jasnell I would like to take the
lib/repl.jskysnm commentedon Dec 17, 2017
@joyeecheung @jasnell If anyone doesn't take the
lib/net.js, I would like to take it.mannanali413 commentedon Dec 17, 2017
@jasnell I will take up lib/_tls_wrap.js
styfle commentedon Dec 17, 2017
@joyeecheung @jasnell I will take lib/fs.js
jasnell commentedon Dec 17, 2017
@styfle ... Heads up, I'm currently doing quite a bit of work in fs.js, including hitting the rest of the error codes
styfle commentedon Dec 17, 2017
@jasnell Should I take a different file or are you doing them all??
40 remaining items
tls: comment about old-style errors
tls: comment about old-style errors
tls: comment about old-style errors
tls: comment about old-style errors