Skip to content

util: improve error message of _errnoException#17626

Closed
starkwang wants to merge 2 commits into
nodejs:masterfrom
starkwang:util-improve-err-msg
Closed

util: improve error message of _errnoException#17626
starkwang wants to merge 2 commits into
nodejs:masterfrom
starkwang:util-improve-err-msg

Conversation

@starkwang

@starkwang starkwang commented Dec 12, 2017

Copy link
Copy Markdown
Contributor

The usage of ERR_INVALID_ARG_TYPE in _errnoException is a little inappropriate. This change is to improve it.

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

util

@nodejs-github-bot nodejs-github-bot added the util Issues and PRs related to the built-in util module. label Dec 12, 2017
@Trott Trott added semver-major PRs that contain breaking changes and should be released in the next major version. tsc-review labels Dec 12, 2017
@Trott

Trott commented Dec 12, 2017

Copy link
Copy Markdown
Member

Out of caution, labeling semver-major. However, I definitely see a case for patch on this one. I believe our policy is that if an error code changes, it's considered a breaking change unless the TSC says otherwise.

@nodejs/tsc: I think this one should be patch rather than major. Is there consensus on that? If so, I'll remove the semver-major label.

@joyeecheung joyeecheung left a comment

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.

LGTM with one suggestion

Comment thread lib/util.js Outdated

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.

Since there is an integer check and the type name is already in prose style, maybe change this to 'a negative integer' for better clarity?

@joyeecheung

Copy link
Copy Markdown
Member

@Trott The changed error is new in v9.x, I doubt this change could cause any serious breakage, so I am +1 on marking this semver-patch.

@jasnell

jasnell commented Dec 28, 2017

Copy link
Copy Markdown
Member

I'd prefer this as semver-major

@jasnell

jasnell commented Dec 28, 2017

Copy link
Copy Markdown
Member

@starkwang

Copy link
Copy Markdown
Contributor Author

CI seems failed. I'm fixing it.

The usage of ERR_INVALID_ARG_TYPE in _errnoException
is a little inappropriate. This change is to improve it.
@starkwang starkwang force-pushed the util-improve-err-msg branch from 9c8a78c to 8e7d18e Compare December 29, 2017 02:25
@starkwang

Copy link
Copy Markdown
Contributor Author

@starkwang

Copy link
Copy Markdown
Contributor Author

Landed in c64ca56

@starkwang starkwang closed this Dec 29, 2017
starkwang added a commit that referenced this pull request Dec 29, 2017
The usage of ERR_INVALID_ARG_TYPE in _errnoException
is a little inappropriate. This change is to improve it.

PR-URL: #17626
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@Trott Trott removed the tsc-review label Dec 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semver-major PRs that contain breaking changes and should be released in the next major version. util Issues and PRs related to the built-in util module.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants