mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-12-12 14:01: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
|
|
@ -280,7 +280,7 @@ public class Socks5BytestreamRequest implements BytestreamRequest {
|
|||
*/
|
||||
private void cancelRequest() throws XMPPErrorException, NotConnectedException {
|
||||
String errorMessage = "Could not establish socket with any provided host";
|
||||
XMPPError error = new XMPPError(XMPPError.Condition.item_not_found, errorMessage);
|
||||
XMPPError error = XMPPError.from(XMPPError.Condition.item_not_found, errorMessage);
|
||||
IQ errorIQ = IQ.createErrorResponse(this.bytestreamRequest, error);
|
||||
this.manager.getConnection().sendPacket(errorIQ);
|
||||
throw new XMPPErrorException(errorMessage, error);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue