Skip to content

Commit

Permalink
Remove console.log and let caller handle the error
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-fleck-at committed Jan 16, 2024
1 parent 584f376 commit 2c79aed
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions packages/core/src/common/messaging/proxy-factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<Client> = Disposable & {
/**
Expand Down Expand Up @@ -120,7 +119,7 @@ export class RpcProxyFactory<T extends object> implements ProxyHandler<T> {
* @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();
}

Expand Down Expand Up @@ -173,9 +172,6 @@ export class RpcProxyFactory<T extends object> implements ProxyHandler<T> {
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;
}
}
Expand Down

0 comments on commit 2c79aed

Please sign in to comment.