Skip to content

Commit 61bed13

Browse files
authored
Merge pull request microsoft#186784 from microsoft/tyriar/186775
Log errors in pty host channel
2 parents 2a58dad + 70db8a2 commit 61bed13

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/vs/platform/terminal/node/ptyService.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,13 @@ export function traceRpc(_target: any, key: string, descriptor: any) {
4646
if (this.traceRpcArgs.simulatedLatency) {
4747
await timeout(this.traceRpcArgs.simulatedLatency);
4848
}
49-
const result = await fn.apply(this, args);
49+
let result: any;
50+
try {
51+
result = await fn.apply(this, args);
52+
} catch (e) {
53+
this.traceRpcArgs.logService.error(`[RPC Response] PtyService#${fn.name}`, e);
54+
throw e;
55+
}
5056
if (this.traceRpcArgs.logService.getLevel() === LogLevel.Trace) {
5157
this.traceRpcArgs.logService.trace(`[RPC Response] PtyService#${fn.name}`, result);
5258
}

0 commit comments

Comments
 (0)