Browse Source

process: use internal/errors in internalNextTick

PR-URL: https://github.com/nodejs/node/pull/13982
Refs: https://github.com/nodejs/node/pull/12892
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
v6
Tobias Nießen 8 years ago
parent
commit
3129b2c035
  1. 2
      lib/internal/process/next_tick.js

2
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)

Loading…
Cancel
Save