plugin XEP-0045: log "failure" on configure error
This commit is contained in:
parent
59faac55fe
commit
c857c375fc
1 changed files with 6 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue