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

Function hideStackFrames

lib/internal/errors.js:540–551  ·  view source on GitHub ↗

* This function removes unnecessary frames from Node.js core errors. * @template {(...args: unknown[]) => unknown} T * @param {T} fn * @returns {T}

(fn)

Source from the content-addressed store, hash-verified

538 * @returns {T}
539 */
540function hideStackFrames(fn) {
541 function wrappedFn(...args) {
542 try {
543 return ReflectApply(fn, this, args);
544 } catch (error) {
545 Error.stackTraceLimit && ErrorCaptureStackTrace(error, wrappedFn);
546 throw error;
547 }
548 }
549 wrappedFn.withoutStackTrace = fn;
550 return wrappedFn;
551}
552
553// Utility function for registering the error codes. Only used here. Exported
554// *only* to allow for testing.

Callers 14

_http_outgoing.jsFile · 0.85
getCheckedFunctionFunction · 0.85
errors.jsFile · 0.85
validators.jsFile · 0.85
util.jsFile · 0.85
hkdf.jsFile · 0.85
util.jsFile · 0.85
compat.jsFile · 0.85
core.jsFile · 0.85
glob.jsFile · 0.85
utils.jsFile · 0.85
mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…