mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-12-14 06:51:08 +01:00
Rework XMPP Error class design
Introduce AbstractError, change 'Conditions' to enums. Because of AbstractError, it was necessary that PlainStreamElement and TopLevelStreamElement becomes an interface. Thus the implementation of TopLevelStreamElement.toString() had to be removed. This adds - policy-violation - unexpected-request to XMPPError.Condition, and removes the - payment-required - remote-server-error - unexpected-condition - request-timeout Conditions The file transfer code does now no longer throw XMPPErrorExceptions, but SmackExceptions. Fixes SMACK-608. Makes it possible to resolves SMACK-386.
This commit is contained in:
parent
cc09192095
commit
9286a1decb
31 changed files with 582 additions and 548 deletions
|
|
@ -593,8 +593,7 @@ public class AdHocCommandManager extends Manager {
|
|||
private void respondError(AdHocCommandData response, XMPPError.Condition condition,
|
||||
AdHocCommand.SpecificErrorCondition specificCondition) throws NotConnectedException
|
||||
{
|
||||
XMPPError error = new XMPPError(condition);
|
||||
error.addExtension(new AdHocCommandData.SpecificError(specificCondition));
|
||||
XMPPError error = new XMPPError(condition, new AdHocCommandData.SpecificError(specificCondition));
|
||||
respondError(response, error);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue