mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-09 17:19:39 +02:00
Introduce SmackMessageException
This commit is contained in:
parent
b51a6c54e8
commit
7fce6b5a98
13 changed files with 76 additions and 46 deletions
|
@ -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");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue