FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

errors, console: migrate to use internal/errors.js by slammayjammay · Pull Request #11308 · nodejs/node · GitHub

/ node Public

errors, console: migrate to use internal/errors.js - #11308

Closed
slammayjammay wants to merge 1 commit into
nodejs:masterfrom
slammayjammay:internal-errors-console
Closed

errors, console: migrate to use internal/errors.js#11308
slammayjammay wants to merge 1 commit into
nodejs:masterfrom
slammayjammay:internal-errors-console

Conversation

Copy link
Copy Markdown
Contributor

Migrate lib/console.js to use internal/errors.js.

Refs: #11273

cc @jasnell

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

errors, console

nodejs-github-bot added console Issues and PRs related to the console subsystem. errors Issues and PRs related to JavaScript errors originated in Node.js core. labels Feb 11, 2017
Comment thread doc/api/errors.md
[domains]: domain.html
[event emitter-based]: events.html#events_class_eventemitter
[file descriptors]: https://en.wikipedia.org/wiki/File_descriptor
[Node.js Error Codes]: #nodejs-error-codes

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I think it will be _ not -. You can confirm this by building the docs locally, with make docopen.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I just checked and #nodejs-error-codes works.

Copy link
Copy Markdown
Contributor

Related: #11319 also has an implementation for invalidArgType.

jasnell commented Feb 12, 2017

Copy link
Copy Markdown
Member

Yes, some duplication across these is fine. We'll sort it out by rebasing as things get landed.

jasnell added the semver-major PRs that contain breaking changes and should be released in the next major version. label Feb 14, 2017
Comment thread lib/console.js
}
if (!stdout || typeof stdout.write !== 'function') {
throw new TypeError('Console expects a writable stream instance');
throw new errors.TypeError('ERR_INVALID_ARG_TYPE', 'stdout', 'WriteStream');

joyeecheung Feb 15, 2017
edited
Loading

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Hmm, wait, WriteStream is not an actual type or class name (at least the constructor of writable stream from our stream module is named Writable). Is it OK to pass a descriptive type (like "writable stream") to the formatter of ERR_INVALID_ARG_TYPE? @jasnell

joyeecheung Feb 15, 2017
edited
Loading

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Oh right, there are tty.WriteStream and fs.WriteStream, but then those subclass Writable and the condition here even only checks .write, not instanceof.

jasnell added the blocked PRs that are blocked by other issues or PRs. label Apr 5, 2017

fhinkel commented Jun 7, 2017

Copy link
Copy Markdown
Contributor

I'm closing this because it's been inactive for quite a while. Feel free to reopen or ping a collaborator to get it reopened if needed.

fhinkel closed this Jun 7, 2017
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blocked PRs that are blocked by other issues or PRs. console Issues and PRs related to the console subsystem. errors Issues and PRs related to JavaScript errors originated in Node.js core. semver-major PRs that contain breaking changes and should be released in the next major version.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants


Back | FazBrowse Home | New Git URL