Skip to content

Commit

Permalink
Merge pull request #186784 from microsoft/tyriar/186775
Browse files Browse the repository at this point in the history
Log errors in pty host channel
  • Loading branch information
Tyriar authored Jun 30, 2023
2 parents 2a58dad + 70db8a2 commit 61bed13
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/vs/platform/terminal/node/ptyService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,13 @@ export function traceRpc(_target: any, key: string, descriptor: any) {
if (this.traceRpcArgs.simulatedLatency) {
await timeout(this.traceRpcArgs.simulatedLatency);
}
const result = await fn.apply(this, args);
let result: any;
try {
result = await fn.apply(this, args);
} catch (e) {
this.traceRpcArgs.logService.error(`[RPC Response] PtyService#${fn.name}`, e);
throw e;
}
if (this.traceRpcArgs.logService.getLevel() === LogLevel.Trace) {
this.traceRpcArgs.logService.trace(`[RPC Response] PtyService#${fn.name}`, result);
}
Expand Down

0 comments on commit 61bed13

Please sign in to comment.