(ctx, error)
| 1741 | } |
| 1742 | |
| 1743 | function getStackString(ctx, error) { |
| 1744 | let stack; |
| 1745 | try { |
| 1746 | stack = error.stack; |
| 1747 | } catch { |
| 1748 | // If stack is getter that throws, we ignore the error. |
| 1749 | } |
| 1750 | if (stack) { |
| 1751 | if (typeof stack === 'string') { |
| 1752 | return stack; |
| 1753 | } |
| 1754 | ctx.seen.push(error); |
| 1755 | ctx.indentationLvl += 4; |
| 1756 | const result = formatValue(ctx, stack); |
| 1757 | ctx.indentationLvl -= 4; |
| 1758 | ctx.seen.pop(); |
| 1759 | return `${ErrorPrototypeToString(error)}\n ${result}`; |
| 1760 | } |
| 1761 | return ErrorPrototypeToString(error); |
| 1762 | } |
| 1763 | |
| 1764 | function getStackFrames(ctx, err, stack) { |
| 1765 | const frames = StringPrototypeSplit(stack, '\n'); |
no test coverage detected
searching dependent graphs…