Added excpetions.
This commit is contained in:
parent
1ecb595bee
commit
51cf3fb500
@ -116,10 +116,9 @@ class RPC:
|
||||
print("Error while receiving:", ex)
|
||||
break
|
||||
if msg.type == aiohttp.WSMsgType.CLOSED:
|
||||
break
|
||||
raise Exception("WebSocket closed.")
|
||||
elif msg.type == aiohttp.WSMsgType.ERROR:
|
||||
print("WebSocket error:", msg)
|
||||
break
|
||||
raise Exception("WebSocket error:", msg)
|
||||
elif msg.type == aiohttp.WSMsgType.TEXT:
|
||||
|
||||
if self.current_call_id and not msg.json().get('callId') != self.current_call_id:
|
||||
@ -134,5 +133,4 @@ class RPC:
|
||||
break
|
||||
else:
|
||||
raise Exception("Unexpected message type.")
|
||||
print("huh")
|
||||
return None
|
||||
|
Loading…
Reference in New Issue
Block a user