(ex: Error)
| 50 | } |
| 51 | |
| 52 | export function parseStack(ex: Error) { |
| 53 | // Work around bug in stackTrace when ex has an array already |
| 54 | if (ex.stack && Array.isArray(ex.stack)) { |
| 55 | const concatenated = { ...ex, stack: ex.stack.join('\n') }; |
| 56 | // Work around for https://github.com/microsoft/vscode-jupyter/issues/12550 |
| 57 | return stackTrace.parse.call(stackTrace, concatenated); |
| 58 | } |
| 59 | // Work around for https://github.com/microsoft/vscode-jupyter/issues/12550 |
| 60 | return stackTrace.parse.call(stackTrace, ex); |
| 61 | } |
| 62 | |
| 63 | function serializeStackTrace(ex: Error): string { |
| 64 | // We aren't showing the error message (ex.message) since it might contain PII. |
no test coverage detected