diff --git a/sat/core/sat_main.py b/sat/core/sat_main.py index e335e98d..3ae2deea 100644 --- a/sat/core/sat_main.py +++ b/sat/core/sat_main.py @@ -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 diff --git a/sat/plugins/plugin_xep_0045.py b/sat/plugins/plugin_xep_0045.py index ad6d5390..15a8788d 100644 --- a/sat/plugins/plugin_xep_0045.py +++ b/sat/plugins/plugin_xep_0045.py @@ -237,7 +237,8 @@ class XEP_0045(object): # a proper configuration management should be done log.debug(_(u"room locked !")) d = client._muc_client.configure(room.roomJID, {}) - d.addErrback(lambda __: log.error(_(u'Error while configuring the room'))) + d.addErrback(self.host.logErrback, + msg=_(u'Error while configuring the room: {failure_}')) return room.fully_joined def _joinEb(self, failure, client, room_jid, nick, password):