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

Function decorateCJSErrorWithTSMessage

lib/internal/process/execution.js:249–257  ·  view source on GitHub ↗

* Adds the TS message to the error stack. * * At the 3rd line of the stack, the message is added. * @param {string} originalStack The stack to decorate * @param {string} newMessage the message to add to the error stack * @returns {void}

(originalStack, newMessage)

Source from the content-addressed store, hash-verified

247 * @returns {void}
248 */
249function decorateCJSErrorWithTSMessage(originalStack, newMessage) {
250 let index;
251 for (let i = 0; i < 3; i++) {
252 index = StringPrototypeIndexOf(originalStack, '\n', index + 1);
253 }
254 return StringPrototypeSlice(originalStack, 0, index) +
255 '\n' + newMessage +
256 StringPrototypeSlice(originalStack, index);
257}
258
259/**
260 *

Callers 1

evalTypeScriptFunction · 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…