From 858c14e78f59af4a0a366bc69d76128285602898 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 PR-URL: https://github.com/nodejs/node/pull/13982 Refs: https://github.com/nodejs/node/pull/12892 Reviewed-By: James M Snell Reviewed-By: Luigi Pinca --- 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)