public static class XMPPException.XMPPErrorException extends XMPPException
StanzaError by calling getStanzaError().XMPPException.FailedNonzaException, XMPPException.StreamErrorException, XMPPException.XMPPErrorException| Constructor and Description |
|---|
XMPPErrorException(Stanza stanza,
StanzaError error)
Creates a new XMPPErrorException with the XMPPError that was the root case of the exception.
|
XMPPErrorException(Stanza stanza,
StanzaError error,
Stanza request)
Creates a new XMPPErrorException with the XMPPError that was the root case of the exception.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getMessage() |
Stanza |
getRequest()
Get the request which triggered the error response causing this exception.
|
Stanza |
getStanza()
Gets the stanza associated with this exception.
|
StanzaError |
getStanzaError()
Returns the stanza error extension element associated with this exception.
|
static void |
ifHasErrorThenThrow(Stanza packet) |
static void |
ifHasErrorThenThrow(Stanza packet,
Stanza request) |
public XMPPErrorException(Stanza stanza, StanzaError error)
stanza - stanza that contained the exception.error - the root cause of the exception.public XMPPErrorException(Stanza stanza, StanzaError error, Stanza request)
request - the request which triggered the error.stanza - stanza that contained the exception.error - the root cause of the exception.public StanzaError getStanzaError()
public Stanza getStanza()
null if the exception is not from a
stanza.public Stanza getRequest()
null.public java.lang.String getMessage()
getMessage in class java.lang.Throwablepublic static void ifHasErrorThenThrow(Stanza packet) throws XMPPException.XMPPErrorException
XMPPException.XMPPErrorExceptionpublic static void ifHasErrorThenThrow(Stanza packet, Stanza request) throws XMPPException.XMPPErrorException
XMPPException.XMPPErrorException