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

Function addMarkdownPathToErrorStack

tools/doc/deprecationCodes.mjs:15–23  ·  view source on GitHub ↗
(error, node)

Source from the content-addressed store, hash-verified

13 `DEP${codeAsNumber.toString().padStart(4, '0')}`;
14
15const addMarkdownPathToErrorStack = (error, node) => {
16 const { line, column } = node.position.start;
17 const [header, ...lines] = error.stack.split('\n');
18 error.stack =
19 header +
20 `\n at <anonymous> (${source}:${line}:${column})\n` +
21 lines.join('\n');
22 return error;
23};
24
25const testHeading = (headingNode, expectedDeprecationCode) => {
26 try {

Callers 4

testHeadingFunction · 0.85
testYAMLCommentFunction · 0.85
testDeprecationTypeFunction · 0.85

Calls 2

splitMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…