plugin XEP-0045: log "failure" on configure error

This commit is contained in:
Goffi 2019-07-06 15:51:48 +02:00
commit c857c375fc

View file

@ -596,12 +596,13 @@ class SAT(service.Service):
"""
return unicode(self.memory.getConfig(section, name, ""))
def logErrback(self, failure_):
"""generic errback logging
def logErrback(self, failure_, msg=_(u"Unexpected error: {failure_}")):
"""Generic errback logging
@param msg(unicode): error message ("failure_" key will be use for format)
can be used as last errback to show unexpected error
"""
log.error(_(u"Unexpected error: {}".format(failure_)))
log.error(msg.format(failure_=failure_))
return failure_
#  namespaces