Browse Source

interface: also log cancellations in send_request

master
SomberNight 2 years ago
parent
commit
fef895295f
No known key found for this signature in database
GPG Key ID: B33B5F232C6271E9
  1. 4
      electrum/interface.py

4
electrum/interface.py

@ -170,10 +170,14 @@ class NotificationSession(RPCSession):
super().send_request(*args, **kwargs),
timeout)
except (TaskTimeout, asyncio.TimeoutError) as e:
self.maybe_log(f"--> request timed out: {args} (id: {msg_id})")
raise RequestTimedOut(f'request timed out: {args} (id: {msg_id})') from e
except CodeMessageError as e:
self.maybe_log(f"--> {repr(e)} (id: {msg_id})")
raise
except BaseException as e: # cancellations, etc. are useful for debugging
self.maybe_log(f"--> {repr(e)} (id: {msg_id})")
raise
else:
self.maybe_log(f"--> {response} (id: {msg_id})")
return response

Loading…
Cancel
Save