Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

errors: improve ERR_INVALID_OPT_VALUE message #34671

Closed
wants to merge 2 commits into from

Conversation

lundibundi
Copy link
Member

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

I also thought of changing the message from always having the quotes (i.e. "42" -> 42) around value to make it easier to distinguish between different value types (i.e. string vs number), wdyt?

* use util.inspect for value presentation
* allow to optionally specify error reason
@nodejs-github-bot nodejs-github-bot added child_process Issues and PRs related to the child_process subsystem. errors Issues and PRs related to JavaScript errors originated in Node.js core. net Issues and PRs related to the net subsystem. labels Aug 7, 2020
@nodejs-github-bot
Copy link
Collaborator

lib/internal/errors.js Outdated Show resolved Hide resolved
Copy link
Member

@Trott Trott left a comment

Choose a reason for hiding this comment

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

Left two optional nits, but looks good to me with or without them.

@lundibundi lundibundi requested a review from a team as a code owner August 10, 2020 16:06
@lundibundi lundibundi requested a review from a team August 10, 2020 16:06
@lundibundi lundibundi added the request-ci Add this label to start a Jenkins CI on a PR. label Aug 14, 2020
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Aug 14, 2020
@nodejs-github-bot
Copy link
Collaborator

@lundibundi lundibundi added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Aug 14, 2020
mmarchini pushed a commit that referenced this pull request Aug 15, 2020
* use util.inspect for value presentation
* allow to optionally specify error reason

PR-URL: #34671
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Mary Marchini <oss@mmarchini.me>
@mmarchini
Copy link
Contributor

Landed in 8da8ec9

@mmarchini mmarchini closed this Aug 15, 2020
MylesBorins pushed a commit that referenced this pull request Aug 17, 2020
* use util.inspect for value presentation
* allow to optionally specify error reason

PR-URL: #34671
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Mary Marchini <oss@mmarchini.me>
@danielleadams danielleadams mentioned this pull request Aug 20, 2020
BethGriggs pushed a commit that referenced this pull request Aug 20, 2020
* use util.inspect for value presentation
* allow to optionally specify error reason

PR-URL: #34671
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Mary Marchini <oss@mmarchini.me>
MylesBorins pushed a commit that referenced this pull request Nov 3, 2020
* use util.inspect for value presentation
* allow to optionally specify error reason

PR-URL: #34671
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Mary Marchini <oss@mmarchini.me>
@MylesBorins MylesBorins mentioned this pull request Nov 3, 2020
MylesBorins pushed a commit that referenced this pull request Nov 16, 2020
* use util.inspect for value presentation
* allow to optionally specify error reason

PR-URL: #34671
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Mary Marchini <oss@mmarchini.me>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. child_process Issues and PRs related to the child_process subsystem. errors Issues and PRs related to JavaScript errors originated in Node.js core. net Issues and PRs related to the net subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants