plugin XEP-0313: log issues in addToHistory instead of raising error
This commit is contained in:
parent
f627edaabe
commit
633e1eb203
1 changed files with 9 additions and 1 deletions
|
|
@ -135,7 +135,15 @@ class XEP_0313(object):
|
|||
continue
|
||||
# adding message to history
|
||||
mess_data = client.messageProt.parseMessage(fwd_message_elt)
|
||||
yield client.messageProt.addToHistory(mess_data)
|
||||
try:
|
||||
yield client.messageProt.addToHistory(mess_data)
|
||||
except exceptions.CancelError as e:
|
||||
log.warning(
|
||||
u"message has not been added to history: {e}".format(e=e))
|
||||
except Exception as e:
|
||||
log.error(
|
||||
u"can't add message to history: {e}\n{xml}"
|
||||
.format(e=e, xml=mess_elt.toXml()))
|
||||
|
||||
if not count:
|
||||
log.info(_(u"We have received no message while offline"))
|
||||
|
|
|
|||
Loading…
Reference in a new issue