export class RpcError extends Error { constructor(message?: string) { super(message || ''); this.name = 'RpcError'; }}
export class RpcErrorUseAfterClose extends RpcError { constructor(message?: string) { super(message || 'A connection or transport was used after being closed.'); this.name = 'RpcErrorUseAfterClose'; }}
export class RpcErrorUnknownMethod extends RpcError { constructor(message?: string) { super(message || 'No method was found with the given name.'); this.name = 'RpcErrorUnknownMethod'; }}
export class RpcErrorTimeout extends RpcError { constructor(message?: string) { super(message || 'A timeout occurred.'); this.name = 'RpcErrorTimeout'; }}
export class RpcErrorNetworkProblem extends RpcError { constructor(message?: string) { super(message || 'A network problem occurred.'); this.name = 'RpcErrorNetworkProblem'; }}
export class RpcErrorFromMethod extends RpcError { constructor(message?: string) { super(message || 'The method threw an error.'); this.name = 'RpcErrorFromMethod'; }}