Class jabberwerx.Stanza.ErrorInfo (MINIMAL)
Extends
JWModel.
Representation of stanza error information.
Constructor Attributes | Constructor Name and Description |
---|---|
jabberwerx.Stanza.ErrorInfo(type, cond, text)
Creates a new ErrorInfo with the given information. |
Field Attributes | Field Name and Description |
---|---|
The condition of the error info. |
|
The optional text description for the error info. |
|
The type of error info. |
Method Attributes | Method Name and Description |
---|---|
<static> |
jabberwerx.Stanza.ErrorInfo.createWithNode(node)
Creates an ErrorInfo based on the given node. |
getNode()
Retrieves the element for this ErrorInfo. |
|
Called after this object is rehydrated. |
Creates a new ErrorInfo with the given information.
- Parameters:
- {String} type Optional
- The error type ("cancel", "auth", etc)
- {String} cond Optional
- The error condition
- {String} text Optional
- The error text description
The condition of the error info. This is the expanded-name of the predefined condition for the ErrorInfo.
The optional text description for the error info.
The type of error info.
Creates an ErrorInfo based on the given node.
- Parameters:
- {Element} node
- The XML <error/>
- Throws:
- {TypeError}
- If {node} is not an element
- Returns:
- {jabberwerx.Stanza.ErrorInfo} The ErrorInfo
Retrieves the element for this ErrorInfo. The returned element is as follows:
<error type="{type}"> <{condition-local-name} xmlns="urn:ietf:params>xml:ns:xmpp-stanzas"/> <text xmlns="urn:ietf:params>xml:ns:xmpp-stanzas">{text}</text> </error>
- Returns:
- {Element} The DOM representation
Called after this object is rehydrated. This method sets the toString method as expected.