Skip to content

Commit

Permalink
Logging in case of failures
Browse files Browse the repository at this point in the history
  • Loading branch information
DonJayamanne committed Mar 6, 2024
1 parent 7d5b8c8 commit 016064d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/platform/common/application/extensions.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,10 @@ export class Extensions implements IExtensions {
public determineExtensionFromCallStack(stack?: string): { extensionId: string; displayName: string } {
stack = stack || new Error().stack;
try {
const jupyterExtRoot = extensions.getExtension(JVSC_EXTENSION_ID)!.extensionUri.toString().toLowerCase();
let frames: string[] = [];
if (stack) {
const jupyterExtRoot = extensions
.getExtension(JVSC_EXTENSION_ID)!
.extensionUri.toString()
.toLowerCase();
const frames = stack
frames = stack
.split('\n')
.map((f) => {
const result = /\((.*)\)/.exec(f);
Expand Down Expand Up @@ -104,7 +102,9 @@ export class Extensions implements IExtensions {
}
}
}
traceError(`Unable to determine the caller of the extension API for trace stack.`, stack);
traceError(`Unable to determine the caller of the extension API for trace stack`, stack);
traceError(`Jupyter Root`, jupyterExtRoot);
traceError(`Frames`, frames);
return { extensionId: unknownExtensionId, displayName: DataScience.unknownPackage };
} catch (ex) {
traceError(`Unable to determine the caller of the extension API for trace stack.`, stack);
Expand Down

0 comments on commit 016064d

Please sign in to comment.