slidge.util.error#

Module Contents#

Functions#

exception(self, e)

Monkeypatch on slixmpp to use the 'by' attribute

reply(self[, body, clear])

Overrides slixmpp's Message.reply(), since it strips to sender's resource

Attributes#

slidge.util.error.exception(self, e)[source]#

Monkeypatch on slixmpp to use the ‘by’ attribute

slidge.util.error.reply(self, body=None, clear=True)[source]#

Overrides slixmpp’s Message.reply(), since it strips to sender’s resource for mtype=groupchat, and we do not want that, because when we raise an XMPPError, we actually want to preserve the resource. (this is called in RootStanza.exception() to handle XMPPErrors)

slidge.util.error.Conditions[source]#
slidge.util.error.ErrorTypes[source]#
slidge.util.error.TYPE_BY_CONDITION: dict[Conditions, ErrorTypes][source]#
exception slidge.util.error.XMPPError(condition='undefined-condition', text='', by=None, etype=None)[source]#

Bases: slixmpp.exceptions.XMPPError

Improvements over Base: include by, automatically determine appropriate etype if not given

Initialize self. See help(type(self)) for accurate signature.

Parameters:
  • condition (Conditions) –

  • by (Optional[slixmpp.types.JidStr]) –

  • etype (Optional[ErrorTypes]) –

slidge.util.error.log[source]#