1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-09-09 17:19:39 +02:00

Introduce SmackMessageException

This commit is contained in:
Florian Schmaus 2019-02-10 21:39:48 +01:00
parent b51a6c54e8
commit 7fce6b5a98
13 changed files with 76 additions and 46 deletions

View file

@ -76,7 +76,9 @@ public class IoTDiscoveryIntegrationTest extends AbstractSmackIntegrationTest {
}
}
public static ThingState registerThing(IoTDiscoveryManager iotDiscoveryManager, Thing thing) throws XMPPErrorException, InterruptedException, SmackException {
public static ThingState registerThing(IoTDiscoveryManager iotDiscoveryManager, Thing thing)
throws XMPPErrorException, InterruptedException, SmackException.SmackMessageException,
NotConnectedException, NoResponseException {
int attempts = 0;
while (true) {
try {
@ -86,7 +88,7 @@ public class IoTDiscoveryIntegrationTest extends AbstractSmackIntegrationTest {
iotDiscoveryManager.unregister();
}
if (attempts++ > 3) {
throw new SmackException("Could no register thing");
throw new SmackException.SmackMessageException("Could no register thing");
}
}
}