More specific exception handling
This commit is contained in:
parent
da4be6d7e4
commit
3ada7d1a98
1 changed files with 3 additions and 3 deletions
|
@ -190,9 +190,9 @@ class PMS_Websocket(WebSocket):
|
|||
|
||||
try:
|
||||
message = loads(message)
|
||||
except Exception as ex:
|
||||
log.error('%s: Error decoding message from websocket: %s'
|
||||
% (self.__class__.__name__, ex))
|
||||
except ValueError:
|
||||
log.error('%s: Error decoding message from websocket'
|
||||
% self.__class__.__name__)
|
||||
log.error(message)
|
||||
return False
|
||||
try:
|
||||
|
|
Loading…
Reference in a new issue