Go to the latest version of this document.
search in docstrings

Search bar offers the following options:

- Term presence. The below example searches for documents that must contain “foo”, might contain “bar” and must not contain “baz”: `+foo bar -baz`
- Wildcards. The below example searches for documents with words beginning with “foo”: `foo*`
- Search in specific fields. The following search matches all objects in "twisted.mail" that matches “search”: `+qname:twisted.mail.* +search`

  Possible fields: 'name', 'qname' (fully qualified name), 'docstring', and 'kind'. Last two fields are only applicable if "search in docstrings" is enabled.

- Fuzzy matches. The following search matches all documents that have a word within 1 edit distance of “foo”: `foo~1`

Results provided by Lunr.js

# ``twisted`.`words`.`protocols`.`jabber`.`error``

module documentation
(source)

XMPP Error support.

Exception | `BaseError` | Base class for XMPP error exceptions.
Exception | `StanzaError` | Stanza Error exception.
Exception | `StreamError` | Stream Error exception.
Function | `exceptionFromStanza` | Build an exception object from an error stanza.
Function | `exceptionFromStreamError` | Build an exception object from a stream error.
Constant | `CODES_TO_CONDITIONS` | Undocumented
Constant | `NS_XML` | Undocumented
Constant | `NS_XMPP_STANZAS` | Undocumented
Constant | `NS_XMPP_STREAMS` | Undocumented
Constant | `STANZA_CONDITIONS` | Undocumented
Function | `_parseError` | Parses an error element.

def exceptionFromStanza(stanza): (source)

Build an exception object from an error stanza.

Parameters
stanza:`domish.Element` | the error stanza
Returns
`StanzaError` | the generated exception object

def exceptionFromStreamError(element): (source)

Build an exception object from a stream error.

Parameters
element:`domish.Element` | the stream error
Returns
`StreamError` | the generated exception object

CODES_TO_CONDITIONS: `dict` = (source)

Undocumented

Value

    {'302': ('gone', 'modify'),
     '400': ('bad-request', 'modify'),
     '401': ('not-authorized', 'auth'),
     '402': ('payment-required', 'auth'),
     '403': ('forbidden', 'auth'),
     '404': ('item-not-found', 'cancel'),
     '405': ('not-allowed', 'cancel'),
    ...

NS_XML: `str` = (source)

Undocumented

Value

    'http://www.w3.org/XML/1998/namespace'

NS_XMPP_STANZAS: `str` = (source)

Undocumented

Value

    'urn:ietf:params:xml:ns:xmpp-stanzas'

NS_XMPP_STREAMS: `str` = (source)

Undocumented

Value

    'urn:ietf:params:xml:ns:xmpp-streams'

STANZA_CONDITIONS: `dict` = (source)

Undocumented

Value

    {'bad-request': {'code': '400', 'type': 'modify'},
     'conflict': {'code': '409', 'type': 'cancel'},
     'feature-not-implemented': {'code': '501', 'type': 'cancel'},
     'forbidden': {'code': '403', 'type': 'auth'},
     'gone': {'code': '302', 'type': 'modify'},
     'internal-server-error': {'code': '500', 'type': 'wait'},
     'item-not-found': {'code': '404', 'type': 'cancel'},
    ...

def _parseError(error, errorNamespace): (source)

Parses an error element.

Parameters
error:`domish.Element` | The error element to be parsed
errorNamespace:`str` | The namespace of the elements that hold the error condition and text.
Returns
`dict` | Dictionary with extracted error information. If present, keys `condition`, `text`, `textLang` have a string value, and `appCondition` has an `domish.Element` value.