Permalink
Browse files

process: use internal/errors in internalNextTick

PR-URL: #13982
Refs: #12892
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information...
tniessen committed Jun 29, 2017
1 parent f05653d commit 3129b2c035a1fb9b1bf07e5ecddcebce4c5fa4b0
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/internal/process/next_tick.js
@@ -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)

2 comments on commit 3129b2c

@davidmurdoch

This comment has been minimized.

Show comment
Hide comment
@davidmurdoch

davidmurdoch Aug 3, 2017

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.

davidmurdoch replied Aug 3, 2017

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

This comment has been minimized.

Show comment
Hide comment
@jasnell

jasnell Aug 3, 2017

Member

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.

Member

jasnell replied Aug 3, 2017

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.