Skip to content

Commit

Permalink
process: use internal/errors in internalNextTick
Browse files Browse the repository at this point in the history
PR-URL: #13982
Refs: #12892
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
  • Loading branch information
tniessen committed Jul 2, 2017
1 parent f05653d commit 3129b2c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/internal/process/next_tick.js
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ function setupNextTick() {
// about to exit since the callback would not have a chance to be executed.
function internalNextTick(triggerAsyncId, callback) {
if (typeof callback !== 'function')
throw new TypeError('callback is not a function');
throw new errors.TypeError('ERR_INVALID_CALLBACK');
// CHECK(Number.isSafeInteger(triggerAsyncId) || triggerAsyncId === null)
// CHECK(triggerAsyncId > 0 || triggerAsyncId === null)

Expand Down

2 comments on commit 3129b2c

@davidmurdoch
Copy link

Choose a reason for hiding this comment

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

Just curious if the breaking changes like this one (ERR_INVALID_CALLBACK maps to the message Callback must be a function, not callback is not a function) are being documented anywhere.

@jasnell
Copy link
Member

@jasnell jasnell commented on 3129b2c Aug 3, 2017

Choose a reason for hiding this comment

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

All of these conversions are marked as semver-major and called out as such in the changelogs. When these land in the 9.0.0 release, I'll be sure to call these out as much as possible in the notable changes.

Please sign in to comment.