MCPcopy Index your code
hub / github.com/nodejs/node / codedTypeError

Function codedTypeError

lib/internal/webidl.js:89–94  ·  view source on GitHub ↗

* Creates a TypeError with a Node.js error code. * @param {string} message Error message. * @param {string} code Node.js error code to assign. * @returns {TypeError}

(message, code)

Source from the content-addressed store, hash-verified

87 * @returns {TypeError}
88 */
89function codedTypeError(message, code) {
90 // eslint-disable-next-line no-restricted-syntax
91 const err = new TypeError(message);
92 setOwnProperty(err, 'code', code);
93 return err;
94}
95
96/**
97 * Creates the exception thrown by Web IDL converters.

Callers 1

makeExceptionFunction · 0.85

Calls 1

setOwnPropertyFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…