Remove superfluous error messages and handle uncaught exceptions
This commit is contained in:
parent
ef04f49152
commit
ee743ac327
|
@ -262,7 +262,6 @@ class SpectrumBackend:
|
||||||
|
|
||||||
def handleConvMessagePayload(self, data):
|
def handleConvMessagePayload(self, data):
|
||||||
payload = protocol_pb2.ConversationMessage()
|
payload = protocol_pb2.ConversationMessage()
|
||||||
self.logger.error("handleConvMessagePayload")
|
|
||||||
if (payload.ParseFromString(data) == False):
|
if (payload.ParseFromString(data) == False):
|
||||||
#TODO: ERROR
|
#TODO: ERROR
|
||||||
return
|
return
|
||||||
|
|
|
@ -437,6 +437,8 @@ class Session(YowsupApp):
|
||||||
try:
|
try:
|
||||||
buddy = self.buddies[buddy]
|
buddy = self.buddies[buddy]
|
||||||
except KeyError:
|
except KeyError:
|
||||||
|
# Sometimes whatsapp send our own presence
|
||||||
|
if buddy != self.legacyName:
|
||||||
self.logger.error("Buddy not found: %s", buddy)
|
self.logger.error("Buddy not found: %s", buddy)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
|
@ -62,7 +62,13 @@ logging.basicConfig( \
|
||||||
|
|
||||||
# Handler
|
# Handler
|
||||||
def handleTransportData(data):
|
def handleTransportData(data):
|
||||||
|
try:
|
||||||
plugin.handleDataRead(data)
|
plugin.handleDataRead(data)
|
||||||
|
except SystemExit as e:
|
||||||
|
raise e
|
||||||
|
except:
|
||||||
|
logger = logging.getLogger('transwhat')
|
||||||
|
logger.error(traceback.format_exc())
|
||||||
|
|
||||||
e4u.load()
|
e4u.load()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue