printing exception with the log
@@ -414,16 +414,19 @@ class ZStack(NetworkInterface):
msg, ident = self.rxMsgs.popleft()
if ident in self.remotesByKeys:
self.remotesByKeys[ident].isConnected = True
+
frm = self.remotesByKeys[ident].name \
if ident in self.remotesByKeys else ident
+
r = handlePingPong(msg, frm)
if r:
continue
+
try:
msg = json.loads(msg)
except Exception as e:
- logger.error('Error while converting message {} '
- 'to JSON from {}'.format(msg, ident))
+ logger.error('Error {} while converting message {} '
+ 'to JSON from {}'.format(e, msg, ident))
continue
# TODO: Refactor, this should be moved to `Batched`
