| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| [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 |
There was a problem hiding this comment.
I think it will be _ not -. You can confirm this by building the docs locally, with make docopen.
Sorry, something went wrong.
There was a problem hiding this comment.
I just checked and #nodejs-error-codes works.
Sorry, something went wrong.
|
Related: #11319 also has an implementation for invalidArgType. |
Sorry, something went wrong.
|
Yes, some duplication across these is fine. We'll sort it out by rebasing as things get landed. |
Sorry, something went wrong.
| } | ||
| 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'); |
There was a problem hiding this comment.
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
Sorry, something went wrong.
There was a problem hiding this comment.
Oh right, there are tty.WriteStream and fs.WriteStream, but then those subclass Writable and the condition here even only checks .write, not instanceof.
Sorry, something went wrong.
|
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. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Migrate lib/console.js to use internal/errors.js.
Refs: #11273
cc @jasnell
Checklist
Affected core subsystem(s)
errors, console