MCPcopy Create free account
hub / github.com/deepnote/vscode-deepnote / parseStack

Function parseStack

src/platform/errors/index.ts:52–61  ·  view source on GitHub ↗
(ex: Error)

Source from the content-addressed store, hash-verified

50}
51
52export 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
63function serializeStackTrace(ex: Error): string {
64 // We aren't showing the error message (ex.message) since it might contain PII.

Calls 1

joinMethod · 0.80

Tested by

no test coverage detected