pyxmpp.error

Package pyxmpp :: Module error |
[show private | hide private]
[frames | no frames]

## Module pyxmpp.error

XMPP error handling.

Normative reference:
  - RFC 3920
  - JEP 86

Classes
`ErrorNode` | Base class for both XMPP stream and stanza errors
`StanzaErrorNode` | Stanza error element.
`StreamErrorNode` | Stream error element.

Exceptions
`ErrorNodeError` | Raised on error with XMPP error handling.

Variable Summary
`str` | `__revision__` = `'$Id: error.py 559 2005-03-20 18:01:06Z j...`
`dict` | `legacy_codes` = `{502: 'service-unavailable', 503: 'servic...`
`str` | `PYXMPP_ERROR_NS` = `'http://pyxmpp.jabberstudio.org/xmlns/...`
`str` | `STANZA_ERROR_NS` = `'urn:ietf:params:xml:ns:xmpp-stanzas'`
`dict` | `stanza_errors` = `{u'gone': ('Recipient or server can no l...`
`str` | `STREAM_ERROR_NS` = `'urn:ietf:params:xml:ns:xmpp-streams'`
`dict` | `stream_errors` = `{u'internal-server-error': ('Internal se...`
`str` | `STREAM_NS` = `'http://etherx.jabber.org/streams'`

Imported modules:
  `libxml2`, `pyxmpp.xmlextra`
Imported functions:
  `from_utf8`, `to_utf8`
Imported variables:
  `common_doc`, `common_ns`, `common_root`

Variable Details

    ### __revision__ Type: `str` Value:
        '$Id: error.py 559 2005-03-20 18:01:06Z jajcus $'

    ### legacy_codes Type: `dict` Value:
        {302: 'redirect',
         400: 'bad-request',
         401: 'not-authorized',
         402: 'payment-required',
         403: 'forbidden',
         404: 'item-not-found',
         405: 'not-allowed',
         406: 'not-acceptable',
        ...

    ### PYXMPP_ERROR_NS Type: `str` Value:
        'http://pyxmpp.jabberstudio.org/xmlns/errors'

    ### STANZA_ERROR_NS Type: `str` Value:
        'urn:ietf:params:xml:ns:xmpp-stanzas'

    ### stanza_errors Type: `dict` Value:
        {u'bad-request': ('Bad request', 'modify', 400),
         u'conflict': ('Named session or resource already exists', 'cancel', 4\
        09),
         u'feature-not-implemented': ('Feature requested is not implemented',
                                      'cancel',
                                      501),
         u'forbidden': ('You are forbidden to perform requested action', 'auth\
        ', 403),
        ...

    ### STREAM_ERROR_NS Type: `str` Value:
        'urn:ietf:params:xml:ns:xmpp-streams'

    ### stream_errors Type: `dict` Value:
        {u'bad-format': ('Received XML cannot be processed',),
         u'bad-namespace-prefix': ('Bad namespace prefix',),
         u'conflict': ('Closing stream because of conflicting stream being ope\
        ned',),
         u'connection-timeout': ('Connection was idle too long',),
         u'host-gone': ('Hostname is no longer hosted on the server',),
         u'host-unknown': ('Hostname requested is not known to the server',),
         u'improper-addressing': ('Improper addressing',),
        ...

    ### STREAM_NS Type: `str` Value:
        'http://etherx.jabber.org/streams'