From 2c79aed87a63fbe7d1a938af6b3eda6fa0c65468 Mon Sep 17 00:00:00 2001 From: Martin Fleck Date: Tue, 16 Jan 2024 18:11:37 +0100 Subject: [PATCH] Remove console.log and let caller handle the error --- packages/core/src/common/messaging/proxy-factory.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/core/src/common/messaging/proxy-factory.ts b/packages/core/src/common/messaging/proxy-factory.ts index 05fdff1ad9f23..9c74581937312 100644 --- a/packages/core/src/common/messaging/proxy-factory.ts +++ b/packages/core/src/common/messaging/proxy-factory.ts @@ -25,7 +25,6 @@ import { RequestHandler, RpcProtocol } from '../message-rpc/rpc-protocol'; import { ConnectionHandler } from './handler'; import { Deferred } from '../promise-util'; import { decorate, injectable, unmanaged } from '../../../shared/inversify'; -import { ILogger } from '../logger'; export type RpcServer = Disposable & { /** @@ -120,7 +119,7 @@ export class RpcProxyFactory implements ProxyHandler { * @param target - The object to expose to RPC methods calls. If this * is omitted, the proxy won't be able to handle requests, only send them. */ - constructor(public target?: any, protected rpcProtocolFactory = defaultRpcProtocolFactory, protected logger?: ILogger) { + constructor(public target?: any, protected rpcProtocolFactory = defaultRpcProtocolFactory) { this.waitForConnection(); } @@ -173,9 +172,6 @@ export class RpcProxyFactory implements ProxyHandler { if (e instanceof ResponseError) { throw e; } - const reason = e.message || ''; - const stack = e.stack || ''; - this.logger?.error(`Request ${method} failed with error: ${reason}`, stack); throw e; } }