* 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)
| 247 | * @returns {void} |
| 248 | */ |
| 249 | function 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 | * |
no outgoing calls
no test coverage detected
searching dependent graphs…