mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-12 10:39:38 +02:00
Improve message of XMPPErrorException
by including the XMPP entity which send the XMPP error reply to us. Also cleanup the no longer used constructors.
This commit is contained in:
parent
9165e818d9
commit
d976434bb3
7 changed files with 65 additions and 57 deletions
|
@ -30,7 +30,6 @@ import org.jivesoftware.smack.XMPPException.XMPPErrorException;
|
|||
import org.jivesoftware.smack.filter.StanzaFilter;
|
||||
import org.jivesoftware.smack.packet.IQ;
|
||||
import org.jivesoftware.smack.packet.Stanza;
|
||||
import org.jivesoftware.smack.packet.XMPPError;
|
||||
import org.jivesoftware.smackx.disco.ServiceDiscoveryManager;
|
||||
import org.jxmpp.jid.DomainBareJid;
|
||||
import org.jxmpp.jid.EntityFullJid;
|
||||
|
@ -113,8 +112,7 @@ public class ConnectionUtils {
|
|||
public Stanza answer(InvocationOnMock invocation) throws Throwable {
|
||||
Stanza packet = protocol.getResponses().poll();
|
||||
if (packet == null) return packet;
|
||||
XMPPError xmppError = packet.getError();
|
||||
if (xmppError != null) throw new XMPPErrorException(xmppError);
|
||||
XMPPErrorException.ifHasErrorThenThrow(packet);
|
||||
return packet;
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue