pyxmpp2.error.StanzaErrorElement

Package pyxmpp2 :: Module error :: Class StanzaErrorElement |
[hide private]

# Class StanzaErrorElement

Stanza error element.

Instance Methods | [hide private]
__init__(self, element_or_cond, text=None, language=None, error_type=None) Initialize an StanzaErrorElement object. |
_from_xml(self, element) Initialize an ErrorElement object from an XML element. |
`unicode` |
get_message(self) Get the standard English message for the error. |
`ElementTree.Element` |
as_xml(self, stanza_namespace=None) Return the XML error representation. |
Inherited from `ErrorElement`: `add_custom_condition`, `serialize` Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__sizeof__`, `__str__`, `__subclasshook__`

Class Variables | [hide private]
| error_qname = ``'``{jabber:client}error``'``
| text_qname = ``'``{jabber:client}text``'``
| cond_qname_prefix = ``'``{urn:ietf:params:xml:ns:xmpp-stanzas}``'``

Instance Variables | [hide private]
`unicode` | error_type 'type' of the error, one of: 'auth', 'cancel', 'continue', 'modify', 'wait'
Inherited from `ErrorElement`: `condition`, `custom_condition`, `language`, `text`

Properties | [hide private]
Inherited from `ErrorElement`: `condition_name` Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self, element_or_cond, text=None, language=None, error_type=None) (Constructor) |
Initialize an StanzaErrorElement object. Parameters: `element_or_cond` (`ElementTree.Element` or `unicode`) - XML <error/> element to decode or an error condition name or element. `text` (`unicode`) - optional description to override the default one `language` (`unicode`) - RFC 3066 language tag for the description `error_type` (`unicode`) - 'type' of the error, one of: 'auth', 'cancel', 'continue', 'modify', 'wait' Overrides: object.__init__

### _from_xml(self, element) |
Initialize an ErrorElement object from an XML element. Parameters: `element` (`ElementTree.Element`) - XML element to be decoded. Overrides: ErrorElement._from_xml

### get_message(self) |
Get the standard English message for the error. Returns: `unicode` the error message.

### as_xml(self, stanza_namespace=None) |
Return the XML error representation. Parameters: `stanza_namespace` (`unicode`) - namespace URI of the containing stanza Returns: `ElementTree.Element` Overrides: ErrorElement.as_xml