(ctx, error)
| 2174 | return { len: 0, offset: 0 }; |
| 2175 | } |
| 2176 | function getStackString(ctx, error) { |
| 2177 | if (error.stack) { |
| 2178 | if (typeof error.stack === 'string') { |
| 2179 | return error.stack; |
| 2180 | } |
| 2181 | // This 'NaN' is a very strange Nodeism, but is necessary for correct behaviour! |
| 2182 | return formatValue(ctx, error.stack, NaN); |
| 2183 | } |
| 2184 | return Error.prototype.toString.call(error); |
| 2185 | } |
| 2186 | function getStackFrames(ctx, err, stack) { |
| 2187 | const frames = stack.split('\n'); |
| 2188 | let cause; |
no test coverage detected