Remove superfluous error messages and handle uncaught exceptions

This commit is contained in:
moyamo 2016-01-02 22:40:11 +02:00
parent ef04f49152
commit ee743ac327
3 changed files with 12 additions and 5 deletions

View File

@ -262,7 +262,6 @@ class SpectrumBackend:
def handleConvMessagePayload(self, data):
payload = protocol_pb2.ConversationMessage()
self.logger.error("handleConvMessagePayload")
if (payload.ParseFromString(data) == False):
#TODO: ERROR
return

View File

@ -437,6 +437,8 @@ class Session(YowsupApp):
try:
buddy = self.buddies[buddy]
except KeyError:
# Sometimes whatsapp send our own presence
if buddy != self.legacyName:
self.logger.error("Buddy not found: %s", buddy)
return

View File

@ -62,7 +62,13 @@ logging.basicConfig( \
# Handler
def handleTransportData(data):
try:
plugin.handleDataRead(data)
except SystemExit as e:
raise e
except:
logger = logging.getLogger('transwhat')
logger.error(traceback.format_exc())
e4u.load()