Skip to content

Commit 858c14e

Browse files
tniessenaddaleax
authored andcommitted
process: use internal/errors in internalNextTick
PR-URL: nodejs#13982 Refs: nodejs#12892 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent c97ad59 commit 858c14e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/internal/process/next_tick.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ function setupNextTick() {
295295
// about to exit since the callback would not have a chance to be executed.
296296
function internalNextTick(triggerAsyncId, callback) {
297297
if (typeof callback !== 'function')
298-
throw new TypeError('callback is not a function');
298+
throw new errors.TypeError('ERR_INVALID_CALLBACK');
299299
// CHECK(Number.isSafeInteger(triggerAsyncId) || triggerAsyncId === null)
300300
// CHECK(triggerAsyncId > 0 || triggerAsyncId === null)
301301

0 commit comments

Comments
 (0)