From d7a3c3cecc67f0ddb36734f305994981b1cf9ba2 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Thu, 21 Feb 2019 15:50:50 -0500 Subject: [PATCH] errors: add ERR_INSPECTOR_COMMAND error This error is used to propagate errors returned from the inspector module's command system. PR-URL: https://github.com/nodejs/node/pull/26255 Reviewed-By: Anna Henningsen Reviewed-By: Eugene Ostroukhov Reviewed-By: Ruben Bridgewater --- doc/api/errors.md | 5 +++++ lib/internal/errors.js | 1 + 2 files changed, 6 insertions(+) diff --git a/doc/api/errors.md b/doc/api/errors.md index ca2beef2dd5..b9d26421497 100644 --- a/doc/api/errors.md +++ b/doc/api/errors.md @@ -1159,6 +1159,11 @@ inspector was already connected. While using the `inspector` module, an attempt was made to use the inspector after the session had already closed. + +### ERR_INSPECTOR_COMMAND + +An error occurred while issuing a command via the `inspector` module. + ### ERR_INSPECTOR_NOT_AVAILABLE diff --git a/lib/internal/errors.js b/lib/internal/errors.js index 13a6194d0cb..b3b745252a1 100644 --- a/lib/internal/errors.js +++ b/lib/internal/errors.js @@ -706,6 +706,7 @@ E('ERR_INCOMPATIBLE_OPTION_PAIR', 'Option "%s" can not be used in combination with option "%s"', TypeError); E('ERR_INSPECTOR_ALREADY_CONNECTED', '%s is already connected', Error); E('ERR_INSPECTOR_CLOSED', 'Session was closed', Error); +E('ERR_INSPECTOR_COMMAND', 'Inspector error %d: %s', Error); E('ERR_INSPECTOR_NOT_AVAILABLE', 'Inspector is not available', Error); E('ERR_INSPECTOR_NOT_CONNECTED', 'Session is not connected', Error); E('ERR_INVALID_ADDRESS_FAMILY', 'Invalid address family: %s', RangeError);