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

Function getError

test/fixtures/snapshot/mutate-error-stack-trace-limit.js:34–44  ·  view source on GitHub ↗
(message, depth)

Source from the content-addressed store, hash-verified

32});
33
34function getError(message, depth) {
35 let counter = 1;
36 function recurse() {
37 if (counter++ < depth) {
38 return recurse();
39 }
40 const error = new Error(message);
41 return error.stack;
42 }
43 return recurse();
44}

Callers 2

checkMutateFunction · 0.70

Calls 1

recurseFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…