mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2025-12-07 21:51:07 +01:00
Add XMPPErrorException.getStanzaError()
Also deprecate getXMPPError and let StanzaError implement ExtensionElement.
This commit is contained in:
parent
651ee7b85e
commit
23bb5c5625
31 changed files with 108 additions and 75 deletions
|
|
@ -211,7 +211,7 @@ public class StreamManagement {
|
|||
}
|
||||
}
|
||||
|
||||
public StanzaError.Condition getXMPPErrorCondition() {
|
||||
public StanzaError.Condition getStanzaErrorCondition() {
|
||||
return condition;
|
||||
}
|
||||
|
||||
|
|
@ -228,7 +228,7 @@ public class StreamManagement {
|
|||
if (condition != null) {
|
||||
xml.rightAngleBracket();
|
||||
xml.append(condition.toString());
|
||||
xml.xmlnsAttribute(StanzaError.NAMESPACE);
|
||||
xml.xmlnsAttribute(StanzaError.ERROR_CONDITION_AND_TEXT_NAMESPACE);
|
||||
xml.closeEmptyElement();
|
||||
}
|
||||
xml.append(textElements);
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ public class ParseStreamManagement {
|
|||
case XmlPullParser.START_TAG:
|
||||
name = parser.getName();
|
||||
String namespace = parser.getNamespace();
|
||||
if (StanzaError.NAMESPACE.equals(namespace)) {
|
||||
if (StanzaError.ERROR_CONDITION_AND_TEXT_NAMESPACE.equals(namespace)) {
|
||||
if (name.equals(AbstractTextElement.ELEMENT)) {
|
||||
String lang = ParserUtils.getXmlLang(parser);
|
||||
String text = parser.nextText();
|
||||
|
|
|
|||
|
|
@ -1139,7 +1139,7 @@ public class XMPPTCPConnection extends AbstractXMPPConnection {
|
|||
break;
|
||||
case Failed.ELEMENT:
|
||||
Failed failed = ParseStreamManagement.failed(parser);
|
||||
FailedNonzaException xmppException = new FailedNonzaException(failed, failed.getXMPPErrorCondition());
|
||||
FailedNonzaException xmppException = new FailedNonzaException(failed, failed.getStanzaErrorCondition());
|
||||
// If only XEP-198 would specify different failure elements for the SM
|
||||
// enable and SM resume failure case. But this is not the case, so we
|
||||
// need to determine if this is a 'Failed' response for either 'Enable'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue