From ee481fe8ca7b1eb0416e0b2cf8f7f99a3983925c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Nie=C3=9Fen?= Date: Thu, 29 Jun 2017 11:52:06 +0200 Subject: [PATCH] process: use internal/errors in internalNextTick Refs: https://github.com/nodejs/node/pull/12892 --- lib/internal/process/next_tick.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/internal/process/next_tick.js b/lib/internal/process/next_tick.js index e41064104e0c3e..418f4ff8816d3f 100644 --- a/lib/internal/process/next_tick.js +++ b/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)